diff options
author | Joseph Hunkeler <jhunk@stsci.edu> | 2009-09-23 13:21:23 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunk@stsci.edu> | 2009-09-23 13:21:23 -0400 |
commit | 4be53ade84f4d8e758a2417884b19b370aa5ecf6 (patch) | |
tree | 21ec7b268d3d63974191757d03386e97a853b24e /netnuke.c | |
parent | b78b5de00ee3a127ed1dad01d18e96338ea0ab92 (diff) | |
download | NetNuke-4be53ade84f4d8e758a2417884b19b370aa5ecf6.tar.gz |
Initial commit of log.c
Fixed character buffer overflow when copying the media names from the structure.
Diffstat (limited to 'netnuke.c')
-rw-r--r-- | netnuke.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -143,8 +143,8 @@ int nuke(media_t device) uint64_t size = device.size; char media[BUFSIZ]; char mediashort[BUFSIZ]; - strncpy(media, device.name, strlen(device.name)); - strncpy(mediashort, device.nameshort, strlen(device.nameshort)); + memcpy(media, device.name, strlen(device.name)+1); + memcpy(mediashort, device.nameshort, strlen(device.nameshort)); /* test with 100MBs worth of data */ if(udef_testmode == true) |