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

Re: svn commit: r12946 - branches/locking/subversion/mod_dav_svn

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2005-02-08 23:01:18 CET

On Tue, 8 Feb 2005 sussman@tigris.org wrote:

> Modified: branches/locking/subversion/mod_dav_svn/version.c
> Url: http://svn.collab.net/viewcvs/svn/branches/locking/subversion/mod_dav_svn/version.c?view=diff&rev=12946&p1=branches/locking/subversion/mod_dav_svn/version.c&r1=12945&p2=branches/locking/subversion/mod_dav_svn/version.c&r2=12946
> ==============================================================================
> --- branches/locking/subversion/mod_dav_svn/version.c (original)
> +++ branches/locking/subversion/mod_dav_svn/version.c Tue Feb 8 15:40:54 2005
...
> + if (svn_xml_is_xml_safe(lock->comment, strlen(lock->comment)))

Woops! Comment is optional, so this can crash.

> + {
> + comment_to_send = apr_xml_quote_string(subpool, lock->comment, 1);
> + }
> + else
> + {
> + svn_string_t comment_string;
> + const svn_string_t *encoded_comment;
> +
> + comment_string.data = lock->comment;
> + comment_string.len = strlen(lock->comment);
> + encoded_comment = svn_base64_encode_string(&comment_string, subpool);
> + comment_to_send = encoded_comment->data;
> + comment_base64 = TRUE;
> + }
> +
> + apr_err = ap_fprintf(output, bb,
> + "<S:owner %s>%s</S:owner>" DEBUG_CR
> + "<S:comment %s>%s</S:comment>" DEBUG_CR

This would convert a null comment to an empty string. (minor.)

> + "<S:/lock>" DEBUG_CR,

Misplaced slash.

Regards,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Feb 8 23:01:10 2005

This is an archived mail posted to the Subversion Dev mailing list.