From 368688fc559f44d4f621cb282996331097f7ac72 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Mon, 22 Jun 2009 11:47:50 +0000 Subject: [PATCH] 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 --- CHANGES | 1 + prog/eepromer/eepromer.c | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 321c9a41..b5726a9e 100644 --- a/CHANGES +++ b/CHANGES @@ -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 diff --git a/prog/eepromer/eepromer.c b/prog/eepromer/eepromer.c index 8273b26c..8a606103 100644 --- a/prog/eepromer/eepromer.c +++ b/prog/eepromer/eepromer.c @@ -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