[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Memory buffer misuse in deadprops.c (was: 'svn commit' fails with PROPPATCH error...)

From: Jay Freeman \(saurik\) <saurik_at_saurik.com>
Date: 2001-11-22 00:53:05 CET

Well, I think I got it :). There is an extra variable (char
*tproppatch) that is being used in deadprops.c (uninitialized... I would
expect a warning to catch that... anyone looking at those things?) that
was supposed to be another one of a similar spelling (proppatch). When
you don't send a log message using -F or -m the server has the pointer
at 0x0, when you do it gets shoved forward to another region and tends
to get initialized to some low value. As the check that is misusing it
only compares it to NULL, this works in the cases where the log message
is there. Below is a patch to fix this (is there somewhere better I
should be sending stuff like this?).

Also, this reminded me of something: shouldn't it offer to open vi or
something if there isn't a log message specified using -F or -m?

Index: ./subversion/mod_dav_svn/deadprops.c
===================================================================
--- ./subversion/mod_dav_svn/.svn/text-base/deadprops.c.svn-base
Tue Nov 20 03:00:53 2001
+++ ./subversion/mod_dav_svn/deadprops.c Wed Nov 21 17:47:40 2001
@@ -119,14 +119,13 @@
 {
   char *propname;
   svn_error_t *serr;
- char *tpropname;
 
   /* get the repos-local name */
   get_repos_propname(db, name, &propname);
 
   /* ### disallow arbitrary, non-SVN properties. this effectively shuts
      ### off arbitrary DeltaV clients for now. */
- if (tpropname == NULL)
+ if (propname == NULL)
     return dav_new_error(db->p, HTTP_CONFLICT, 0,
                          "Properties may only be defined in the "
                          SVN_PROP_PREFIX " and " SVN_PROP_CUSTOM_PREFIX

Sincerely,
Jay Freeman (saurik)
saurik@saurik.com

-----Original Message-----
From: Jay Freeman (saurik) [mailto:saurik@saurik.com]
Sent: Tuesday, November 20, 2001 3:44 AM
To: 'Greg Stein'
Cc: 'svn-dev'
Subject: RE: 'svn commit' fails with PROPPATCH error...

...

What can I do to help shed some light onto this?

Sincerely,
Jay Freeman (saurik)
saurik@saurik.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:49 2006

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.