CVS commit by lunakl: Max size limit for scanf(). Not that I expect this to overflow, but %s in scanf() without a size limit is simply baaaaad. M +2 -2 portable.cpp 1.30.2.3 [POSSIBLY UNSAFE] --- kdeutils/klaptopdaemon/portable.cpp:1.30.2.2 Fri Nov 29 04:01:56 2002 @@ -1,7 +1,7 @@ /* * portable.cpp * - * $Id: portable.cpp,v 1.30.2.2 2002/11/29 03:01:56 staikos Exp $ + * $Id: portable.cpp,v 1.30.2.3 2002/12/06 15:13:05 lunakl Exp $ * * Copyright (c) 1999 Paul Campbell * @@ -101,7 +101,7 @@ f = fopen("/proc/apm", "r"); if (f == NULL) return(1); - s = fscanf(f, "%s %d.%d %x %x %x %x %d%% %d %s\n", + s = fscanf(f, "%255s %d.%d %x %x %x %x %d%% %d %s\n", version, &tmp, &tmp,