uclient-fetch: read_data_cb: fix a potential buffer overflow
authorAlexander Couzens <lynxis@fe80.eu>
Sun, 11 Jun 2017 11:01:06 +0000 (13:01 +0200)
committerAlexander Couzens <lynxis@fe80.eu>
Sun, 11 Jun 2017 11:05:00 +0000 (13:05 +0200)
commit83ce236dab867842cdba88a57db50aae0fd9a4ce
tree058e1d9da429777db8e313fa4a872e2cc0f3e492
parent52d955fd802a4d990b7ff9116f02ff52aa63ffec
uclient-fetch: read_data_cb: fix a potential buffer overflow

When a backend->read() is not implement or returns -1,
This -1 is interpreted as unsigned int resulting
in an access far behind the buffer.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
uclient-fetch.c