Description: Fix FTBFS with glibc 2.43: write through strchr() result on a const pointer
 get_filename_ext() strips the query string of an URL by writing a NUL byte
 through the pointer returned by strchr(). Since glibc 2.43, strchr() is
 qualifier-generic (enabled through _ISOC23_SOURCE, which -D_GNU_SOURCE implies):
 when the argument is a pointer to const, the return type is const char * too,
 so the assignment is a hard compile error ("assignment of read-only location").
 .
 Store the result in a local variable and pass a writable char * path instead,
 keeping the in-place truncation. The only caller passes a mutable buffer
 returned by g_strdup_printf(), so the behaviour is unchanged.
Author: openKylinBot <openKylinBot@openkylin.top>
Origin: vendor
Forwarded: not-needed
Last-Update: 2026-10-19

--- lebiniou-3.67.0.orig/src/bulfius_vui_callback.c
+++ lebiniou-3.67.0/src/bulfius_vui_callback.c
@@ -63,15 +63,19 @@ content_type_from_ext(const char *ext)
 
 
 static const char *
-get_filename_ext(const char *path)
+get_filename_ext(char *path)
 {
-  const char *dot = strrchr(path, '.');
+  char *dot = strrchr(path, '.');
+  char *query;
 
   if ((NULL == dot) || (dot == path)) {
     return "*";
   }
-  if (NULL != strchr(dot, '?')) {
-    *strchr(dot, '?') = '\0';
+
+  /* strip the query string: replace the '?' with a NUL byte, in place */
+  query = strchr(dot, '?');
+  if (NULL != query) {
+    *query = '\0';
   }
 
   return dot;
