Closed Memotech-Bill closed 2 years ago
See https://forums.raspberrypi.com/viewtopic.php?p=1940652#p1940582 for the issue.
The cause is an out-by-one error in line 2114 of bbmain.c. This line should be:
v.s.l = (char *) memchr (bufptr, 0x0D, 256) - bufptr ;
Changing 255 to 256.
If the input line is 255 or more characters long, then the CR is in bufptr[255], the memchr() routine does not find it and returns NULL. As a result the unsigned v.s.l contains a large value, causing a subsequent memcpy() to fail.
Fixed in latest revision
See https://forums.raspberrypi.com/viewtopic.php?p=1940652#p1940582 for the issue.
The cause is an out-by-one error in line 2114 of bbmain.c. This line should be:
Changing 255 to 256.
If the input line is 255 or more characters long, then the CR is in bufptr[255], the memchr() routine does not find it and returns NULL. As a result the unsigned v.s.l contains a large value, causing a subsequent memcpy() to fail.