Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit/libXpm/dist/src merge libXpm 3.5.15.



details:   https://anonhg.NetBSD.org/xsrc/rev/026964cd6610
branches:  trunk
changeset: 7390:026964cd6610
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu Jan 19 05:18:00 2023 +0000

description:
merge libXpm 3.5.15.

diffstat:

 external/mit/libXpm/dist/src/create.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 5176055ebd8b -r 026964cd6610 external/mit/libXpm/dist/src/create.c
--- a/external/mit/libXpm/dist/src/create.c     Thu Jan 19 05:12:22 2023 +0000
+++ b/external/mit/libXpm/dist/src/create.c     Thu Jan 19 05:18:00 2023 +0000
@@ -994,11 +994,15 @@
 #if !defined(FOR_MSW) && !defined(AMIGA)
     if (height != 0 && (*image_return)->bytes_per_line >= INT_MAX / height) {
        XDestroyImage(*image_return);
+       *image_return = NULL;
        return XpmNoMemory;
     }
     /* now that bytes_per_line must have been set properly alloc data */
-    if((*image_return)->bytes_per_line == 0 ||  height == 0)
+    if((*image_return)->bytes_per_line == 0 ||  height == 0) {
+       XDestroyImage(*image_return);
+       *image_return = NULL;
        return XpmNoMemory;
+    }
     (*image_return)->data =
        (char *) XpmMalloc((*image_return)->bytes_per_line * height);
 



Home | Main Index | Thread Index | Old Index