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
There is a risk of array index out of bounds in the main functions of files blkid/cache.c, blkid/save.c, and blkid/read.c. When argc is greater than 2, the test program prints an error log and exits. If the second parameter is not entered when executing the command, argc is 1 and the parameter verification can be passed. In the following code, an array index out of bounds error occurs when using argv[1] to obtain a value.
For example, in the code in blkid/save.c, if argc equals 1, the array index is out of bounds on line 182.
There is a risk of array index out of bounds in the main functions of files blkid/cache.c, blkid/save.c, and blkid/read.c. When argc is greater than 2, the test program prints an error log and exits. If the second parameter is not entered when executing the command, argc is 1 and the parameter verification can be passed. In the following code, an array index out of bounds error occurs when using argv[1] to obtain a value.
For example, in the code in blkid/save.c, if argc equals 1, the array index is out of bounds on line 182.
I think the '>' in these main functions should be replaced with '<', which means the number of parameters must be greater than or equal to 2.
The text was updated successfully, but these errors were encountered: