[PATCH] winefile: avoid array overrun (coverity)
Marcus Meissner
marcus at jet.franken.de
Sat Jan 24 02:52:36 CST 2009
Hi,
This will overrun the widths array by 1 otherwise.
Ciao, Marcus
---
programs/winefile/winefile.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/programs/winefile/winefile.c b/programs/winefile/winefile.c
index 2caff8e..aefe7bd 100644
--- a/programs/winefile/winefile.c
+++ b/programs/winefile/winefile.c
@@ -2732,7 +2732,7 @@ static void calc_single_width(Pane* pane, int col)
x = pane->positions[col] + cx;
- for(; col<COLUMNS; ) {
+ for(; col<COLUMNS-1; ) {
pane->positions[++col] = x;
x += pane->widths[col];
}
--
1.5.6
More information about the wine-patches
mailing list