summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-05-05 09:04:41 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-05-05 09:04:41 -0700
commitb47d2e43eb2cb3817c995d1f7e58500fb40efa2b (patch)
tree9219c3fac80570cdc38d10a47df4e85daf7510fc /os
parent3ac220d6cc386c9ab9995e5b83463c40330e18c2 (diff)
XQuartz: Make a copy of args for our crash reporter vsnprintf
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'os')
-rw-r--r--os/log.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/os/log.c b/os/log.c
index 9579e58d8..4a310e64d 100644
--- a/os/log.c
+++ b/os/log.c
@@ -528,7 +528,12 @@ FatalError(const char *f, ...)
va_start(args, f);
#ifdef __APPLE__
- (void)vsnprintf(__crashreporter_info_buff__, sizeof(__crashreporter_info_buff__), f, args);
+ {
+ va_list args2;
+ va_copy(args2, args);
+ (void)vsnprintf(__crashreporter_info_buff__, sizeof(__crashreporter_info_buff__), f, args2);
+ va_end(args2);
+ }
#endif
VErrorF(f, args);
va_end(args);