From ad4d974d06ba3344e2e0df3277f7e0c42f018a4e Mon Sep 17 00:00:00 2001 From: ajs Date: Wed, 24 Nov 2004 18:20:30 +0000 Subject: In zlog_signal, should probably check the return code from backtrace, just to be safe. --- lib/log.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/log.c b/lib/log.c index 86b54ebb..9d566806 100644 --- a/lib/log.c +++ b/lib/log.c @@ -232,7 +232,8 @@ zlog_signal(int signo, const char *action) void *array[20]; int size; - size = backtrace(array,sizeof(array)/sizeof(array[0])); + if ((size = backtrace(array,sizeof(array)/sizeof(array[0]))) <= 0) + return; s = buf; s = str_append(LOC,"Backtrace for "); s = num_append(LOC,size); -- cgit v1.2.1