Fix array initialization overrun. Reported by David Binderman.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-2.10@5745 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2009-06-22 11:47:50 +00:00
1 parent 765e8ec8cb
commit 368688fc55
2 files changed
+7 -3

No files matched your search

+1
View File
@@ -7,6 +7,7 @@ SVN-HEAD
Module i2c-amd8111: Fix timeout handling (2.6 backport)
Module i2c-piix4: ATI SB800 is not actually supported
Module it87: Properly decode -128 degrees C (2.6 backport)
Program eepromer: Fix array initialization overrun
Program sensord: Fix a memory leak when a chip name is provided
Program sensors: Fix a memory leak when a chip name is provided
Program sensors-detect: Fix detection of older DS1621
+6 -3
View File
@@ -402,7 +402,8 @@ int content_write(int file, int addr){
addr_cnt=HEAD_SIZE;
k=0;
for(j=0;j<=MAX_BLK_SIZE;j++)buf[j]=0;
for(j=0;j<MAX_BLK_SIZE;j++)
buf[j]=0;
@@ -429,7 +430,8 @@ int content_write(int file, int addr){
//printf("i:%d\n",i);
addr_cnt=addr_cnt + i + (delka==1?1:0); //+i
for(j=0;j<=MAX_BLK_SIZE;j++)buf[j]=0;
for(j=0;j<MAX_BLK_SIZE;j++)
buf[j]=0;
i=0;
if(delka<1) {
@@ -508,7 +510,8 @@ void erase(int file, int addr,int eeprom_size){
delka=0;
k=0;
for(j=0;j<=MAX_BLK_SIZE;j++)buf[j]=0;
for(j=0;j<MAX_BLK_SIZE;j++)
buf[j]=0;