Quentin Rameau e2afae6303 sed: prevent overflow of length from bb_get_chunk_from_file
This fragment did not work right:

                temp = bb_get_chunk_from_file(fp, &len);
                if (temp) {
                        /* len > 0 here, it's ok to do temp[len-1] */
                        char c = temp[len-1];

With "int len" _sign-extending_, temp[len-1] can refer to a wrong location
if len > 0x7fffffff.

Signed-off-by: Quentin Rameau <quinq@fifth.space>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-04-01 19:51:14 +02:00
..
2016-11-23 21:51:11 +01:00
2013-07-30 11:52:58 +02:00
2010-10-28 18:57:19 +02:00
2018-02-01 01:41:31 +01:00
2010-10-29 11:46:52 +02:00