You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by kf...@collab.net on 2001/08/14 16:32:06 UTC

Re: CVS update: MODIFIED: mod_dav_svn ...

gstein@tigris.org writes:
>   +      if (strncmp(name, "svn:", 4) == 0)
>   +        {
>   +          svn_stringbuf_set(db->work, "1:");
>   +          svn_stringbuf_appendcstr(db->work, (const char *)name + 4);

I wrote earlier:

> Greg, should we worry about the case where name < 4 bytes long?  It
> seems to me the strncmp() might run off the end, then.

But now I think I understand: these strcmps() are all part of the
temporary "BIG HACK", for which we can assume that all property names
start with "svn:".

Does the hack case cover all the strncmp(blah,4) checks in the prop
code, or just the ones in this commit (which is the one whose log
message actually describes the big hack)?

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: CVS update: MODIFIED: mod_dav_svn ...

Posted by Greg Stein <gs...@lyra.org>.
On Tue, Aug 14, 2001 at 11:32:06AM -0500, kfogel@collab.net wrote:
> gstein@tigris.org writes:
> >   +      if (strncmp(name, "svn:", 4) == 0)
> >   +        {
> >   +          svn_stringbuf_set(db->work, "1:");
> >   +          svn_stringbuf_appendcstr(db->work, (const char *)name + 4);
> 
> I wrote earlier:
> 
> > Greg, should we worry about the case where name < 4 bytes long?  It
> > seems to me the strncmp() might run off the end, then.
> 
> But now I think I understand: these strcmps() are all part of the
> temporary "BIG HACK", for which we can assume that all property names
> start with "svn:".
> 
> Does the hack case cover all the strncmp(blah,4) checks in the prop
> code, or just the ones in this commit (which is the one whose log
> message actually describes the big hack)?

The hack is isolated to *just* the single commit where I discuss it in the
log.

The prior commit, where you noted the strcmp(), is part of another fix to
property handling. We do not want to prepend "svn:custom:" to the
"svn:mime-type" property. The rule that I chose is "if it starts with svn:,
then do not append svn:custom:".

[ more precisely, there is no "prepending", but deciding on the XML
  namespace to use ]

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org