Skip to content

Commit

Permalink
fix snprintf crash
Browse files Browse the repository at this point in the history
git-svn-id: file:///home/svn/nwr/trunk@16 103c2249-d0a5-da11-ade6-0050bffea3d9
  • Loading branch information
greg committed Feb 20, 2003
1 parent b363b1a commit 9d71222
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion decode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ void eas_activate(const char *s)
Message = message;
struct tm *tt = gmtime(&message.issued);
char fn[40];
snprintf(fn, sizeof(fn), "%04d%02d%02d%s%s-%s-%s",
snprintf(fn, sizeof(fn), "%04d%02d%02d%02d%02d-%s-%s",
1900+tt->tm_year,
1+tt->tm_mon,
tt->tm_mday,
Expand Down Expand Up @@ -382,6 +382,7 @@ int main(int argc, char *argv[])
char buf[4096];
int n = fread(buf, 1, sizeof(buf), f);
if (n == 0) {
fprintf(stderr, "decode: eof on input\n");
break;
}
float fbuf[sizeof(buf)/2];
Expand Down

0 comments on commit 9d71222

Please sign in to comment.