DanBloomberg / leptonica

Leptonica is an open source library containing software that is broadly useful for image processing and image analysis applications. The official github repository for Leptonica is: danbloomberg/leptonica. See leptonica.org for more documentation.
Other
1.76k stars 387 forks source link

Fix memory leak (Coverity Scan #1503047) #649

Closed stweil closed 1 year ago

stweil commented 1 year ago

Signed-off-by: Stefan Weil sw@weilnetz.de

stweil commented 1 year ago

The leak can be triggered with illegal values of ascii85flag (for example 2). The new code handles such values like 1. Would a check for valid values 0, 1 be better?

DanBloomberg commented 1 year ago

I think a check at the top for valid values of ascii85flag is a better way to handle this.

stweil commented 1 year ago

Updated, now checks ascii85flag.