mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Report error for out-of-range numerical inputs. Requested by brooks.
This commit is contained in:
parent
19ca1aa0d4
commit
3334a61716
1 changed files with 8 additions and 0 deletions
|
|
@ -30,6 +30,8 @@
|
|||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#define __STDC_LIMIT_MACROS 1
|
||||
|
||||
#include "fdt.hh"
|
||||
|
||||
#include <algorithm>
|
||||
|
|
@ -281,6 +283,12 @@ property::parse_cells(input_buffer &input)
|
|||
valid = false;
|
||||
return;
|
||||
}
|
||||
if ((val < 0) || (val > UINT32_MAX))
|
||||
{
|
||||
input.parse_error("Value out of range");
|
||||
valid = false;
|
||||
return;
|
||||
}
|
||||
push_big_endian(v.byte_data, (uint32_t)val);
|
||||
input.next_token();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue