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

RE: ISSUE+PATCH: author & date of logentry can be empty in specific situation, problems with log.dtd & javahl

From: Lieven Govaerts <lgo_at_mobsol.be>
Date: 2005-08-08 20:53:21 CEST

Peter,

-----Original Message-----
From: Peter N. Lundblad [mailto:peter@famlundblad.se]
Sent: maandag 8 augustus 2005 16:42
To: Lieven Govaerts
Cc: dev@subversion.tigris.org
Subject: Re: ISSUE+PATCH: author & date of logentry can be empty in specific
situation, problems with log.dtd & javahl
...
>> 2. I made a Java application using the javahl bindings, doing the same
>> log request. Both on Windows as Linux this application will crash the
>> Java VM.
>> LogMessage[] lms = cl.logMessages("http://www.mobsol.be/svn/public",\
>> null, null);
>> System.out.println(lms.toString());
>> This happens in the MessageReceiver callback function in SVNClient.cpp.
>>
>> Attached to this mail is a patch for SVNClient.cpp. The patch makes
>> sure that the date object returned to the Java client is 'null' in
>> this situation, by testing specifically for that situation. Other
>> solution might be to fix function svn_time_from_cstring to return NULL
>> when date is NULL.
>>
>I know nothing about JavaHL, so I can't test the patch. By looking at it,
it seems like you introduce the same bug I'm fixing in my upcoming commit,
namely that an
>empty date string should be treated as no date at all. It is strange, but
it is documented in the API docs:-)
>
>Thanks for the report,
>//Peter

Actually, this patch does two things:
1. Check if the date in the log entry is empty; in that case avoid the call
to svn_time_from_cstring.
It's that function that causes the VM to crash.
2. Instead of returning an uninitalized date object, which in Java results
in something random date,
return NULL .

This makes it acting the same as for the empty author field, which is also
null when returned to Java.

Actually, I don't know how you normally handle parameter validation ( is it
the job of the caller? )
but I would expect the function svn_time_from_cstring to return NULL when
date with value NULL
is passed to it.

If you'll update the DTD's, I'll also update the XSD files I created a few
days ago, and post them again
to this list.

You're welcome on the report, had to patch it anyway otherwise my reporting
application didn't work
on our production repository. I hope this or a better patch makes it in the
next SVN release.

regards,

Lieven.

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.2/65 - Release Date: 7/08/2005
 
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Aug 8 20:55:33 2005

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.