Xilinx / bootgen

bootgen source code
Other
34 stars 42 forks source link

strtoul in bif.l corrupts numbers larger than 2^32 on Windows #14

Open PaulTNA opened 3 years ago

PaulTNA commented 3 years ago

On line 277 of bif.l, strtoul is used to convert the value from a string to uint64_t. However on Windows, unsigned long is 32 bits not 64, so strtoul will silently corrupt any value greater than 0xFFFFFFFF to that value.

The correct function should be strtoull