Bug 5010 - wrong initialization of char array torture/basic/base.c
Summary: wrong initialization of char array torture/basic/base.c
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All Linux
: P3 major (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Andrew Bartlett
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-06 06:18 UTC by Indar Kriplani
Modified: 2007-10-09 20:55 UTC (History)
0 users

See Also:


Attachments

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 
memset(buf,0,4).
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
.