mirror of
https://git.freebsd.org/ports.git
synced 2025-07-16 16:59:17 -04:00
Fix a buffer overflow in fak_parse_line.
Submitted by: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
This commit is contained in:
parent
2fa5f89c0e
commit
5ec97f173f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=32295
1 changed files with 14 additions and 0 deletions
14
audio/ascd/files/patch-ag
Normal file
14
audio/ascd/files/patch-ag
Normal file
|
@ -0,0 +1,14 @@
|
|||
--- /usr/ports/audio/ascd/work/ascd-0.13.2/faktory.c Mon Jul 5 20:52:38 1999
|
||||
+++ faktory.c Sat Sep 2 17:26:31 2000
|
||||
@@ -58,9 +58,9 @@
|
||||
unsigned int pos = 0;
|
||||
|
||||
if ((strlen(ligne) > 0) && (ligne[0] != '#')) {
|
||||
- while ((ligne[pos] != ' ') && (ligne[pos] != 9)) pos++;
|
||||
+ while (ligne[pos] && (ligne[pos] != ' ') && (ligne[pos] != 9)) pos++;
|
||||
tes_sncpy(key, ligne, pos);
|
||||
- while (((ligne[pos] == ' ') || (ligne[pos] == 9)) && (pos < strlen(ligne))) pos++;
|
||||
+ while (ligne[pos] && ((ligne[pos] == ' ') || (ligne[pos] == 9))) pos++;
|
||||
if (pos < strlen(ligne)) strcpy(arguments, ligne + pos);
|
||||
else strcpy(arguments, "");
|
||||
if (debug > 2) fprintf(stderr,"++ input: [%s]\n key: [%s]\n args: [%s]\n", ligne, key, arguments);
|
Loading…
Add table
Reference in a new issue