bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sharutils 4.5: Fix memory corruption with "shar ."


From: Andreas Schwab
Subject: Re: sharutils 4.5: Fix memory corruption with "shar ."
Date: Thu, 11 Aug 2005 00:32:27 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux)

Bruce Korb <address@hidden> writes:

> Anyway, it's seems unclear how this writes past allocated memory,
> assuming that "restore_name_length" must be >= 2 before reaching

This assumption is wrong: strlen(".") == 1.

> this code and assuming the allocation is >= restore_name_length+1.

This is irrelevant.  It is writing past the _beginning_ of the allocated
space.

> (The code is not in front of me.)  Also, what is "walkdown" going
> to do with an empty string?

Which empty string?

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]