projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util: Don't read over 'size - 1' bytes of source string in ovs_strlcpy().
[openvswitch]
/
lib
/
backtrace.c
diff --git
a/lib/backtrace.c
b/lib/backtrace.c
index d2d1e40e1353ea1d5d80446d06674eeed4fcbd75..91549db347812b516e2eb4fb27b93c54349deb62 100644
(file)
--- a/
lib/backtrace.c
+++ b/
lib/backtrace.c
@@
-23,7
+23,7
@@
#include "compiler.h"
#include "vlog.h"
#include "compiler.h"
#include "vlog.h"
-VLOG_DEFINE_THIS_MODULE(backtrace)
+VLOG_DEFINE_THIS_MODULE(backtrace)
;
static uintptr_t OVS_UNUSED
get_max_stack(void)
static uintptr_t OVS_UNUSED
get_max_stack(void)
@@
-83,6
+83,7
@@
in_stack(void *p)
void
backtrace_capture(struct backtrace *backtrace)
{
void
backtrace_capture(struct backtrace *backtrace)
{
+#ifdef __GNUC__
void **frame;
size_t n;
void **frame;
size_t n;
@@
-95,4
+96,7
@@
backtrace_capture(struct backtrace *backtrace)
backtrace->frames[n++] = (uintptr_t) frame[1];
}
backtrace->n_frames = n;
backtrace->frames[n++] = (uintptr_t) frame[1];
}
backtrace->n_frames = n;
+#else
+ backtrace->n_frames = 0;
+#endif
}
}