Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/historical/nawk/dist PR/48448: David A. Holland: Av...
details: https://anonhg.NetBSD.org/src/rev/df6739eaf544
branches: trunk
changeset: 325250:df6739eaf544
user: christos <christos%NetBSD.org@localhost>
date: Sun Dec 15 06:41:18 2013 +0000
description:
PR/48448: David A. Holland: Avoid coredump by checking return code of
localtime(3)
diffstat:
external/historical/nawk/dist/run.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diffs (12 lines):
diff -r ce153d321c59 -r df6739eaf544 external/historical/nawk/dist/run.c
--- a/external/historical/nawk/dist/run.c Sun Dec 15 06:10:33 2013 +0000
+++ b/external/historical/nawk/dist/run.c Sun Dec 15 06:41:18 2013 +0000
@@ -1647,6 +1647,8 @@
} else
tv = time((time_t *) 0);
tm = localtime(&tv);
+ if (tm == NULL)
+ FATAL("bad time %jd", (intmax_t)tv);
if (isrec(x)) {
/* format argument not provided, use default */
Home |
Main Index |
Thread Index |
Old Index