You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.
read_qubo() allocates a buffer of size 50 for the 2nd token of a program (p) line and uses sscanf() to copy the token to the buffer. If the token is too long for the buffer, memory will be corrupted and a segmentation fault may ensue.
Also see pull request #83 comments about this issue.
Test 1. The 2nd token of the p line is too big for the buffer allocated for it. Memory is corrupted, but the program appears to work.
$ ./qbsolv -i ittybitty1.qubo
4 bits, find Min, SubMatrix= 47, -a o, timeout=2592000.0 sec
1011
-2.50000 Energy of solution
0 Number of Partitioned calls, 1 output sample
0.00125 seconds of classic cpu time
Test 2. In this case, with a very long rogue token, a segmentation fault occurs.
read_qubo() allocates a buffer of size 50 for the 2nd token of a program (p) line and uses sscanf() to copy the token to the buffer. If the token is too long for the buffer, memory will be corrupted and a segmentation fault may ensue.
Also see pull request #83 comments about this issue.
Test 1. The 2nd token of the p line is too big for the buffer allocated for it. Memory is corrupted, but the program appears to work.
Test 2. In this case, with a very long rogue token, a segmentation fault occurs.
The text was updated successfully, but these errors were encountered: