From 23f9ab5825de755eccc51a602f57d0e8ae53eab5 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 25 Jan 2012 20:47:13 -0800 Subject: [PATCH] pspp-dump-sav: Fix sizeof on "array" that is actually a pointer. Found by clang. Reported-by: Jeremy Lavergne --- utilities/pspp-dump-sav.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utilities/pspp-dump-sav.c b/utilities/pspp-dump-sav.c index 7cdd7d9c..54e4712b 100644 --- a/utilities/pspp-dump-sav.c +++ b/utilities/pspp-dump-sav.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -459,7 +459,7 @@ print_untyped_value (struct sfm_reader *r, char raw_value[8]) double value; value = float_get_double (r->float_format, raw_value); - for (n_printable = 0; n_printable < sizeof raw_value; n_printable++) + for (n_printable = 0; n_printable < 8; n_printable++) if (!isprint (raw_value[n_printable])) break; -- 2.30.2