You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Jostein Chr. Andersen" <jo...@josander.net> on 2003/10/01 05:50:16 UTC
Re: svn-0.30.0-setup.exe trashing the Environment $path as per 0.14.
On Wednesday 01 October 2003 00.04, David Simmons wrote:
> My gut feeling is that there was a buffer overflow in the code that
> updated the registry entry. I.e., the code that updated the path
> variable did not have a large enough buffer to handle the ~1000 byte
> path record. As you may know, the registry can hold very long paths,
> but the DOS shell environment variables appear to be limited to 1023
> bytes.
Thanks for the tip! :-) The current buffer size in svnpath.exe is 1024
bytes. I will increase it.
Jostein
--
Jostein Chr. Andersen <jo...@josander.net> http://www.josander.net/
Public PGP Key:
Key: http://www.josander.net/pub_keys/jostein_josander.net.asc
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn-0.30.0-setup.exe trashing the Environment $path as per 0.14. - Correction
Posted by "Jostein Chr. Andersen" <jo...@josander.net>.
On Thursday 02 October 2003 21.02, Jostein Chr. Andersen wrote:
> I will look at this and do as you sugest within tomorrow (GMT+1).
Correction: I will work on it during this weekend and Monday. I delete
the svnpath program and make a native Inno Setup solution (pascal
script) without any helper programs.
Jostein
--
Jostein Chr. Andersen <jo...@josander.net> http://www.josander.net/
Public PGP Key:
Key: http://www.josander.net/pub_keys/jostein_josander.net.asc
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn-0.30.0-setup.exe trashing the Environment $path as per 0.14.
Posted by "Jostein Chr. Andersen" <jo...@josander.net>.
On Thursday 02 October 2003 19.45, kfogel@collab.net wrote:
> Until you dynamically allocate, you should at least prevent writes
> that run off the end. Maybe you can check the length of the input?
>
> [...]
>
> char buf[1024];
>
> if (len(input) > sizeof(buf))
> {
> abort();
> }
>
> [...]
The current buffer size are 4000, wich is the maximum length in the NT
variations (as far as I know). One user that have this problem had a
path on one machine with a lenght of 160 characters...
I will look at this and do as you sugest within tomorrow (GMT+1).
--
Jostein Chr. Andersen <jo...@josander.net> http://www.josander.net/
Public PGP Key:
Key: http://www.josander.net/pub_keys/jostein_josander.net.asc
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn-0.30.0-setup.exe trashing the Environment $path as per 0.14.
Posted by kf...@collab.net.
"Jostein Chr. Andersen" <jo...@josander.net> writes:
> My C knowledge are limited (svnpath is my second C program, the first was
> named hello.exe).
>
> I will allocate it dynamically as soon as I get time to learn more about
> C (I have seen some examples on how to do it, it don't look to
> difficult), believe me, I'm really looking forward to do it. C looks
> like fun.
Until you dynamically allocate, you should at least prevent writes
that run off the end. Maybe you can check the length of the input?
[...]
char buf[1024];
if (len(input) > sizeof(buf))
{
abort();
}
[...]
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn-0.30.0-setup.exe trashing the Environment $path as per 0.14.
Posted by "Jostein Chr. Andersen" <jo...@josander.net>.
On Wednesday 01 October 2003 20.43, Branko Čibej wrote:
> Jostein Chr. Andersen wrote:
> >Thanks for the tip! :-) The current buffer size in svnpath.exe is
> > 1024 bytes. I will increase it.
>
> Instead, why don't you allocate it dynamically? Then something like
> this won't happen again.
My C knowledge are limited (svnpath is my second C program, the first was
named hello.exe).
I will allocate it dynamically as soon as I get time to learn more about
C (I have seen some examples on how to do it, it don't look to
difficult), believe me, I'm really looking forward to do it. C looks
like fun.
Jostein
--
Jostein Chr. Andersen <jo...@josander.net> http://www.josander.net/
Public PGP Key:
Key: http://www.josander.net/pub_keys/jostein_josander.net.asc
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn-0.30.0-setup.exe trashing the Environment $path as per 0.14.
Posted by Branko Čibej <br...@xbc.nu>.
Jostein Chr. Andersen wrote:
>On Wednesday 01 October 2003 00.04, David Simmons wrote:
>
>
>>My gut feeling is that there was a buffer overflow in the code that
>>updated the registry entry. I.e., the code that updated the path
>>variable did not have a large enough buffer to handle the ~1000 byte
>>path record. As you may know, the registry can hold very long paths,
>>but the DOS shell environment variables appear to be limited to 1023
>>bytes.
>>
>>
>
>Thanks for the tip! :-) The current buffer size in svnpath.exe is 1024
>bytes. I will increase it.
>
>
Instead, why don't you allocate it dynamically? Then something like this
won't happen again.
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org