Skip to content
Snippets Groups Projects
Commit 6bdbe607 authored by ballen4705's avatar ballen4705
Browse files

Fixed some message buffers that were too short -- this would have overwritten

the stack -- duh.


git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@60 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent ef48c65b
No related branches found
No related tags found
No related merge requests found
// $Id: ataprint.c,v 1.11 2002/10/16 13:21:06 ballen4705 Exp $ // $Id: ataprint.c,v 1.12 2002/10/17 04:03:33 ballen4705 Exp $
/* /*
* ataprint.c * ataprint.c
* *
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
void ataPrintDriveInfo (struct hd_driveid drive){ void ataPrintDriveInfo (struct hd_driveid drive){
int version; int version;
const char *description; const char *description;
char unknown[32]; char unknown[64];
version=ataVersionInfo(&description,drive); version=ataVersionInfo(&description,drive);
...@@ -549,7 +549,7 @@ void ataPrintSmartSelfTestlog (struct ata_smart_selftestlog data){ ...@@ -549,7 +549,7 @@ void ataPrintSmartSelfTestlog (struct ata_smart_selftestlog data){
log=&(data.selftest_struct[j]); log=&(data.selftest_struct[j]);
if (nonempty((unsigned char*)log,sizeof(*log))){ if (nonempty((unsigned char*)log,sizeof(*log))){
char *msgtest,*msgstat,percent[16],firstlba[16]; char *msgtest,*msgstat,percent[64],firstlba[64];
// test name // test name
switch(log->selftestnumber){ switch(log->selftestnumber){
......
// $Id: ataprint.cpp,v 1.11 2002/10/16 13:21:06 ballen4705 Exp $ // $Id: ataprint.cpp,v 1.12 2002/10/17 04:03:33 ballen4705 Exp $
/* /*
* ataprint.c * ataprint.c
* *
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
void ataPrintDriveInfo (struct hd_driveid drive){ void ataPrintDriveInfo (struct hd_driveid drive){
int version; int version;
const char *description; const char *description;
char unknown[32]; char unknown[64];
version=ataVersionInfo(&description,drive); version=ataVersionInfo(&description,drive);
...@@ -549,7 +549,7 @@ void ataPrintSmartSelfTestlog (struct ata_smart_selftestlog data){ ...@@ -549,7 +549,7 @@ void ataPrintSmartSelfTestlog (struct ata_smart_selftestlog data){
log=&(data.selftest_struct[j]); log=&(data.selftest_struct[j]);
if (nonempty((unsigned char*)log,sizeof(*log))){ if (nonempty((unsigned char*)log,sizeof(*log))){
char *msgtest,*msgstat,percent[16],firstlba[16]; char *msgtest,*msgstat,percent[64],firstlba[64];
// test name // test name
switch(log->selftestnumber){ switch(log->selftestnumber){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment