libupkg: Fix spurious success in upkg_decode_index.
authorNick Bowler <nbowler@draconx.ca>
Fri, 4 May 2012 00:28:52 +0000 (20:28 -0400)
committerNick Bowler <nbowler@draconx.ca>
Fri, 4 May 2012 00:50:53 +0000 (20:50 -0400)
commit5fca0fe6cdbe90d31cce2ef17c1d76a8cfe0f921
tree3175cf7203734406977c30d2026978b7a8d34327
parentebcf9b833bc750ce81951a3278065bbb86ecbdce
libupkg: Fix spurious success in upkg_decode_index.

Make the upkg_decode_index function fail if the input is truncated,
rather than successfully returning a bogus value.  As an added bonus,
this actually simplifies the code.
src/libupkg.c