Fix buffer overflow in fontname conversion (Bug#29523)
* src/nsterm.m (ns_xlfd_to_fontname): Fix sscanf format. Copyright-paperwork-exempt: yes
This commit is contained in:
parent
bf9b972843
commit
ac316634e4
1 changed files with 2 additions and 2 deletions
|
@ -9152,9 +9152,9 @@ Convert an X font name (XLFD) to an NS font name.
|
||||||
const char *ret;
|
const char *ret;
|
||||||
|
|
||||||
if (!strncmp (xlfd, "--", 2))
|
if (!strncmp (xlfd, "--", 2))
|
||||||
sscanf (xlfd, "--%*[^-]-%[^-]179-", name);
|
sscanf (xlfd, "--%*[^-]-%179[^-]-", name);
|
||||||
else
|
else
|
||||||
sscanf (xlfd, "-%*[^-]-%[^-]179-", name);
|
sscanf (xlfd, "-%*[^-]-%179[^-]-", name);
|
||||||
|
|
||||||
/* stopgap for malformed XLFD input */
|
/* stopgap for malformed XLFD input */
|
||||||
if (strlen (name) == 0)
|
if (strlen (name) == 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue