Why the NULL pointer check is necessary here? #7311
-
ImageMagick version>=6.9 Operating system, version and so onN/A DescriptionI was studying how ImageMagick was affected by the past CVEs. Then I found this fix: #34 I am not sure why the proposed change is necessary? It seems that the I realize that this PR is from almost 10 years ago. However, the related code snippet is still in the most recent code repo. Thanks for any help and explanations! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I have no idea why I accepted this change but it makes no sense reading this almost 9 years later. The condition check already validates that there will be a next image. Maybe @Danack can shed some light on this? |
Beta Was this translation helpful? Give feedback.
-
Well, looking at it, the change is clearly wrong. I think there is a clue in the branch name of
However, that still doesn't make much sense when compared to the code. I have dim recollections of a multi-page/image TIFF where one of the pages had a non-standard extension on it, or something along those lines, but again, looking at the code it doesn't seem to be a correct code change. I still have my old machine that I would have done this on, however the power cable appears to have rotted away, and shorted after being plugged in. So.... ¯\(ツ)/¯ |
Beta Was this translation helpful? Give feedback.
-
Got it. Thank both of you for taking time to answer my question, and for the detailed explanation! |
Beta Was this translation helpful? Give feedback.
Well, looking at it, the change is clearly wrong.
I think there is a clue in the branch name of
ImageMagick-6_scene_nullPointer
and that in the other conversation I said:However, that still doesn't make much sense when compared to the code.
I have dim recollections of a multi-page/image TIFF where one of the pages had a non-standard extension on it, or something along those lines, but again, looking at the code it doesn't seem to be a correct code change.
I still have my old machine that I would have done this on, however the power cable appears to have rotted away, and shorted after being plugged in. So....
¯\(ツ)/¯