Possible bug in libsvn_ra_dav/commit.c? Any sprintf gurus please look.
From: B. W. Fitzpatrick <fitz_at_red-bean.com>
Date: 2001-11-21 06:38:24 CET
(Questions at the very end. This is just a lengthy lead-in). :)
OK. I've spent the better part of this evening trying to figure this
(In other news, I got svn building on Mac OS X 10.1.0
When I run 'svn commit', I get a Segmentation Fault on Mac OS X.
I've run svn under gdb eight ways to Sunday, and I've isolated the
Now here's where it gets weird.
For reference, here's the code in question:
1 static svn_error_t * create_activity(commit_ctx_t *cc)
Note that uuid_buf is declared (APR_UUID_FORMATTED_LENGTH == 36) right
now, if I do a 'p uuid_str' with my program pointer on line 14 (before
(gdb) p uuid_str
(gdb) p uuid_str
the pointer in data has changed from:
0xbffff9bc to
Looks to me like the beginning of the pointer is getting truncated.
My guess is that the sprintf is writing 37 bytes starting from
So I look inside of apr_uuid_format. Basically it does an sprintf of
And now, finally my questions:
1. Doesn't sprintf throw an \0 onto the end of the string that you sprintf into?
Any insight would be appreciated so that I can fix this bug.
If any apr folk on this list have access to moof.apache.org, you'll
-Fitz
---------------------------------------------------------------------
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.