Skip to content

Commit

Permalink
lib/ogsf: Dereference after null check in gvl2.c (#4588)
Browse files Browse the repository at this point in the history
Dereference after null check
  • Loading branch information
ShubhamDesai authored Oct 30, 2024
1 parent 9581ca1 commit 528763f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/ogsf/gvl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,16 @@ void GVL_get_dims(int id, int *rows, int *cols, int *depths)
*rows = gvl->rows;
*cols = gvl->cols;
*depths = gvl->depths;
}

G_debug(3, "GVL_get_dims() id=%d, rows=%d, cols=%d, depths=%d",
gvl->gvol_id, gvl->rows, gvl->cols, gvl->depths);
G_debug(3, "GVL_get_dims() id=%d, rows=%d, cols=%d, depths=%d",
gvl->gvol_id, gvl->rows, gvl->cols, gvl->depths);
}
else {
G_debug(2,
"GVL_get_dims(): Attempted to access a null volume structure "
"for id=%d",
id);
}

return;
}
Expand Down

0 comments on commit 528763f

Please sign in to comment.