Bug 5010 - wrong initialization of char array torture/basic/base.c
wrong initialization of char array torture/basic/base.c
Product: Samba 4.0
Classification: Unclassified
Component: Other
All Linux
: P3 major
: ---
Assigned To: Andrew Bartlett
Andrew Bartlett
Depends on:
  Show dependency treegraph
Reported: 2007-10-06 06:18 UTC by Indar Kriplani
Modified: 2007-10-09 20:55 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Indar Kriplani 2007-10-06 06:18:54 UTC
uint8 array name buf is declared of size 4.at line number 411 in torture/basic/base.c file.

uint8_t buf[4];

at line number 431 this buf is being initialized by following line
memset(&buf, 0, 4); 
The above line can cause crash or memory corruption.

It should be 
Comment 1 Andrew Bartlett 2007-10-09 20:55:04 UTC
Fixed in -r 25596.  Thanks!
Comment 2 Andrew Bartlett 2007-10-09 20:55:42 UTC