فهرست منبع

netmenu: fix unterminated popover strings

s_put() copied characters without writing a NUL terminator, so the tile
titles/subtitles and the summary fallbacks could read past the copied
text into uninitialized stack bytes and render garbage.  Terminate the
string after every copy in both netmenu and the Settings app.
Johannes Zellner 11 ساعت پیش
والد
کامیت
2f49b8441b
2فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 1 0
      user/apps/netmenu/ucmd_netmenu.c
  2. 1 0
      user/apps/settings/ucmd_settings.c

+ 1 - 0
user/apps/netmenu/ucmd_netmenu.c

@@ -47,6 +47,7 @@ static char *s_put(char *p, const char *s)
 {
 	while (s && *s)
 		*p++ = *s++;
+	*p = '\0';
 	return p;
 }
 

+ 1 - 0
user/apps/settings/ucmd_settings.c

@@ -267,6 +267,7 @@ static char *s_put(char *p, const char *s)
 {
 	while (s && *s)
 		*p++ = *s++;
+	*p = '\0';
 	return p;
 }