[15908] in Athena Bugs
inappropriate use of a printf-family function?
daemon@ATHENA.MIT.EDU (Aaron M. Ucko)
Mon Apr 27 01:49:09 1998
To: olc-bugs@MIT.EDU
From: amu@MIT.EDU (Aaron M. Ucko)
Date: 27 Apr 1998 01:48:49 -0400
While browsing through the OLC logs, I noticed some behavior which
suggests some OLC code is calling something like
fprintf(logfile, first_line);
(which has undesired results when first_line contains a %) where you
probably want something like
fputs(logfile, first_line);
(which doesn't treat any non-zero character specially.)
My evidence is oaccounts[12301], in which
it says that I have used 98% of my disk quota but I check my files and
turns into
Subject: nmichel: **it says that I have used 981770550f my disk quota but I check my
Note that "% o" has turned into 177055, presumably the octal
representation of whatever garbage happened to be on the stack. In
most cases, this is merely cosmetic, but something like a %s in the
string will make the server access memory at a random address, which
is likely to cause a segfault.
--
Aaron M. Ucko, KB1CJC <amu@mit.edu> (finger amu@monk.mit.edu)