libstl: check string iterator limit before access in foug_stl_get_format()
This commit is contained in:
parent
35e479bc28
commit
6f1d3ac97e
@ -42,7 +42,7 @@ foug_stl_format_t foug_stl_get_format(foug_stream_t *stream, size_t data_size)
|
|||||||
{
|
{
|
||||||
/* Skip spaces at beginning */
|
/* Skip spaces at beginning */
|
||||||
size_t pos = 0;
|
size_t pos = 0;
|
||||||
while (isspace(fixed_buffer[pos]) && pos < read_size)
|
while (pos < read_size && isspace(fixed_buffer[pos]))
|
||||||
++pos;
|
++pos;
|
||||||
|
|
||||||
/* Next token (if exists) must match "solid " */
|
/* Next token (if exists) must match "solid " */
|
||||||
|
Loading…
Reference in New Issue
Block a user