[pacman-dev] [PATCH] Fix out of boundary reads in pacsort.

Dave Reisner d at falconindy.com
Sat Jun 18 17:10:34 UTC 2016


On Sat, Jun 18, 2016 at 06:44:01PM +0200, Tobias Stoeckmann wrote:
> On Mon, Jun 13, 2016 at 04:01:17PM +1000, Allan McRae wrote:
> > Fixing that strndup is preferable.  I want to keep the ability to handle
> > \0 delimited fields given that is what pacman --machinereadable does
> > (despite that option not being ubiquitous at the moment...)
> 
> If \0 is a valid field _and_ line delimiter, the parsed input becomes
> ambiguous. How is that supposed to be handled?
> 
> 
> Tobias

\n is a valid field and line delimiter, too. We should treat both of
these cases the same -- catch them and reject them as invalid usage.

d


More information about the pacman-dev mailing list