Apply CVE-2016-3177 Use-after-free in gifcolor 96/127696/2 accepted/tizen_4.0_unified accepted/tizen_5.0_unified accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_4.0 tizen_4.0_tv tizen_5.0 tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/4.0/unified/20170816.010915 accepted/tizen/4.0/unified/20170828.222400 accepted/tizen/5.0/unified/20181102.025137 accepted/tizen/5.5/unified/20191031.004904 accepted/tizen/5.5/unified/mobile/hotfix/20201027.062959 accepted/tizen/5.5/unified/wearable/hotfix/20201027.102938 accepted/tizen/unified/20170518.182521 submit/tizen/20170518.062407 submit/tizen/20170608.063146 submit/tizen/20170609.014843 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170828.100005 submit/tizen_5.0/20181101.000006 submit/tizen_5.5/20191031.000006 submit/tizen_5.5_mobile_hotfix/20201026.185106 submit/tizen_5.5_wearable_hotfix/20201026.184306 tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m1_release tizen_4.0.m2_release tizen_5.5.m2_release
authorJiyong Min <jiyong.min@samsung.com>
Fri, 28 Apr 2017 09:18:07 +0000 (18:18 +0900)
committerJiyong Min <jiyong.min@samsung.com>
Fri, 28 Apr 2017 09:30:31 +0000 (18:30 +0900)
Remove unnecessary duplicate EGifClose(). (Fixes SF bug #83)

Multiple use-after-free and double-free vulnerabilities in gifcolor.c
in GIFLIB 5.1.2 have unspecified impact and attack vectors.
https://nvd.nist.gov/vuln/detail/CVE-2016-3177

Change-Id: I24e077f2a3fbd6554d2557c4bdd94e06e3e08661
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
util/gifcolor.c

index 1700b07..b3e586b 100644 (file)
@@ -123,9 +123,6 @@ int main(int argc, char **argv)
     if (EGifCloseFile(GifFile, &ErrorCode) == GIF_ERROR)
     {
        PrintGifError(ErrorCode);
-       if (GifFile != NULL) {
-           EGifCloseFile(GifFile, NULL);
-       }
        exit(EXIT_FAILURE);
     }