SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
14
devel/simulavr/patches/patch-src_eeprom_c
Normal file
14
devel/simulavr/patches/patch-src_eeprom_c
Normal file
|
@ -0,0 +1,14 @@
|
|||
Fix buffer overflow due to incorrect strncat() usage.
|
||||
http://savannah.nongnu.org/bugs/?29049
|
||||
|
||||
--- src/eeprom.c.orig Mon Mar 14 23:22:50 2011
|
||||
+++ src/eeprom.c Mon Mar 14 23:25:25 2011
|
||||
@@ -416,7 +416,7 @@ eeprom_dump_core (EEProm *eeprom, FILE * f_core)
|
||||
line[0] = '\0';
|
||||
}
|
||||
snprintf (buf, 80, "%02x ", storage_readb (eeprom->stor, i));
|
||||
- strncat (line, buf, 80);
|
||||
+ strncat (line, buf, 80 - strlen(line) - 1);
|
||||
}
|
||||
if (dup > 0)
|
||||
{
|
Loading…
Add table
Add a link
Reference in a new issue