Skip to content

Commit

Permalink
fixed NULL ptr deref in sigma fp config handling (afl)
Browse files Browse the repository at this point in the history
  • Loading branch information
msmeissn committed Sep 27, 2024
1 parent 72364f3 commit 57dbf7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions camlibs/ptp2/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -5098,7 +5098,7 @@ _get_SigmaFP_Aperture(CONFIG_GET_ARGS) {
* byte[last] checksum
*/

if (!(xdata[1] & (1<<1))) {
if ((xsize < 2) || (!(xdata[1] & (1<<1)))) {
free (xdata);
return GP_ERROR;
}
Expand Down Expand Up @@ -5244,7 +5244,7 @@ _get_SigmaFP_ShutterSpeed(CONFIG_GET_ARGS) {
* byte[last] checksum
*/

if (!(xdata[1] & (1<<0))) {
if ((xsize < 2) || (!(xdata[1] & (1<<0)))) {
free (xdata);
return GP_ERROR;
}
Expand Down

0 comments on commit 57dbf7e

Please sign in to comment.