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

[Git][xorg-team/lib/libx11][debian-unstable] 12 commits: Fix size calculation in `_XimAttributeToValue`.



Title: GitLab

Timo Aaltonen pushed to branch debian-unstable at X Strike Force / lib / libx11

Commits:

10 changed files:

Changes:

  • configure.ac
    1 1
     
    
    2 2
     # Initialize Autoconf
    
    3 3
     AC_PREREQ([2.60])
    
    4
    -AC_INIT([libX11], [1.6.10],
    
    4
    +AC_INIT([libX11], [1.6.12],
    
    5 5
             [https://gitlab.freedesktop.org/xorg/lib/libx11/issues], [libX11])
    
    6 6
     AC_CONFIG_SRCDIR([Makefile.am])
    
    7 7
     AC_CONFIG_HEADERS([src/config.h include/X11/XlibConf.h])
    

  • debian/changelog
    1
    +libx11 (2:1.6.12-1) unstable; urgency=medium
    
    2
    +
    
    3
    +  * New upstream release.
    
    4
    +  * 001_xim_regression.diff: Dropped, upstream.
    
    5
    +
    
    6
    + -- Timo Aaltonen <tjaalton@debian.org>  Thu, 17 Sep 2020 13:11:41 +0300
    
    7
    +
    
    1 8
     libx11 (2:1.6.10-3) unstable; urgency=medium
    
    2 9
     
    
    3 10
       * Fix 001_xim_regression.diff to actually build.
    

  • debian/patches/001_xim_regression.diff deleted
    1
    -Subject: Fix regression from commit 388b303
    
    2
    -
    
    3
    -References:
    
    4
    -https://gitlab.freedesktop.org/xorg/lib/libx11/-/issues/116
    
    5
    -https://bugs.debian.org/966691
    
    6
    -
    
    7
    -diff --git a/modules/im/ximcp/imRmAttr.c b/modules/im/ximcp/imRmAttr.c
    
    8
    -index 2491908e..e10048f9 100644
    
    9
    ---- a/modules/im/ximcp/imRmAttr.c
    
    10
    -+++ b/modules/im/ximcp/imRmAttr.c
    
    11
    -@@ -265,7 +265,7 @@ _XimAttributeToValue(
    
    12
    - 
    
    13
    - 	    if (num > (USHRT_MAX / sizeof(XIMStyle)))
    
    14
    - 		return False;
    
    15
    --	    if ((sizeof(num) + (num * sizeof(XIMStyle))) > data_len)
    
    16
    -+	    if ((2 * sizeof(CARD16) + (num * sizeof(CARD32))) > data_len)
    
    17
    - 		return False;
    
    18
    - 	    alloc_len = sizeof(XIMStyles) + sizeof(XIMStyle) * num;
    
    19
    - 	    if (alloc_len < sizeof(XIMStyles))
    
    20
    -@@ -379,7 +379,7 @@ _XimAttributeToValue(
    
    21
    - 
    
    22
    - 	    if (num > (UINT_MAX / sizeof(XIMHotKeyTrigger)))
    
    23
    - 		return False;
    
    24
    --	    if ((sizeof(num) + (num * sizeof(XIMHotKeyTrigger))) > data_len)
    
    25
    -+	    if ((2 * sizeof(CARD16) + (num * 3 * sizeof(CARD32))) > data_len)
    
    26
    - 		return False;
    
    27
    - 	    alloc_len = sizeof(XIMHotKeyTriggers)
    
    28
    - 		      + sizeof(XIMHotKeyTrigger) * num;

  • debian/patches/series
    1
    -001_xim_regression.diff
    
    2 1
     003_recognize_glibc_2.3.2_locale_names.diff
    
    3 2
     007_iso8859-15_Compose_fix.diff
    
    4 3
     008_remove_ko_Compose.diff
    

  • include/X11/XKBlib.h
    ... ... @@ -396,7 +396,7 @@ extern Bool XkbTranslateKeyCode(
    396 396
     
    
    397 397
     extern	int		XkbTranslateKeySym(
    
    398 398
         Display *			/* dpy */,
    
    399
    -    register KeySym *		/* sym_return */,
    
    399
    +    KeySym *			/* sym_return */,
    
    400 400
         unsigned int 		/* modifiers */,
    
    401 401
         char *			/* buffer */,
    
    402 402
         int 			/* nbytes */,
    

  • man/XCreateGC.man
    ... ... @@ -178,7 +178,7 @@ If the valuemask contains a valid set of GC mask bits
    178 178
     .BR GCSubwindowMode ,
    
    179 179
     .BR GCGraphicsExposures ,
    
    180 180
     .BR GCClipXOrigin ,
    
    181
    -.BR GCCLipYOrigin ,
    
    181
    +.BR GCClipYOrigin ,
    
    182 182
     .BR GCDashOffset ,
    
    183 183
     or
    
    184 184
     .BR GCArcMode )
    

  • modules/im/ximcp/imRmAttr.c
    ... ... @@ -265,7 +265,7 @@ _XimAttributeToValue(
    265 265
     
    
    266 266
     	    if (num > (USHRT_MAX / sizeof(XIMStyle)))
    
    267 267
     		return False;
    
    268
    -	    if ((sizeof(num) + (num * sizeof(XIMStyle))) > data_len)
    
    268
    +	    if ((2 * sizeof(CARD16) + (num * sizeof(CARD32))) > data_len)
    
    269 269
     		return False;
    
    270 270
     	    alloc_len = sizeof(XIMStyles) + sizeof(XIMStyle) * num;
    
    271 271
     	    if (alloc_len < sizeof(XIMStyles))
    
    ... ... @@ -379,7 +379,7 @@ _XimAttributeToValue(
    379 379
     
    
    380 380
     	    if (num > (UINT_MAX / sizeof(XIMHotKeyTrigger)))
    
    381 381
     		return False;
    
    382
    -	    if ((sizeof(num) + (num * sizeof(XIMHotKeyTrigger))) > data_len)
    
    382
    +	    if ((2 * sizeof(CARD16) + (num * 3 * sizeof(CARD32))) > data_len)
    
    383 383
     		return False;
    
    384 384
     	    alloc_len = sizeof(XIMHotKeyTriggers)
    
    385 385
     		      + sizeof(XIMHotKeyTrigger) * num;
    
    ... ... @@ -1407,7 +1407,7 @@ _XimCountNumberOfAttr(
    1407 1407
         *names_len = 0;
    
    1408 1408
         while (total > min_len) {
    
    1409 1409
     	len = attr[2];
    
    1410
    -	if (len >= (total - min_len)) {
    
    1410
    +	if (len > (total - min_len)) {
    
    1411 1411
     	    return 0;
    
    1412 1412
     	}
    
    1413 1413
     	*names_len += (len + 1);
    

  • modules/om/generic/omGeneric.c
    ... ... @@ -1908,7 +1908,8 @@ init_om(
    1908 1908
         char **required_list;
    
    1909 1909
         XOrientation *orientation;
    
    1910 1910
         char **value, buf[BUFSIZ], *bufptr;
    
    1911
    -    int count = 0, num = 0, length = 0;
    
    1911
    +    int count = 0, num = 0;
    
    1912
    +    unsigned int length = 0;
    
    1912 1913
     
    
    1913 1914
         _XlcGetResource(lcd, "XLC_FONTSET", "on_demand_loading", &value, &count);
    
    1914 1915
         if (count > 0 && _XlcCompareISOLatin1(*value, "True") == 0)
    

  • src/GetStCmap.c
    1
    -
    
    2 1
     /***********************************************************
    
    3 2
     
    
    4 3
     Copyright 1987, 1998  The Open Group
    
    ... ... @@ -111,7 +110,7 @@ Status XGetStandardColormap (
    111 110
     	cmap->blue_mult	 = use->blue_mult;
    
    112 111
     	cmap->base_pixel = use->base_pixel;
    
    113 112
     
    
    114
    -	Xfree (stdcmaps);	/* don't need alloced memory */
    
    113
    +	Xfree (stdcmaps);	/* don't need allocated memory */
    
    115 114
         }
    
    116 115
         return stat;
    
    117 116
     }

  • src/xkb/XKBBind.c
    ... ... @@ -587,8 +587,8 @@ _XkbReloadDpy(Display *dpy)
    587 587
     }
    
    588 588
     
    
    589 589
     int
    
    590
    -XkbTranslateKeySym(register Display *dpy,
    
    591
    -                   register KeySym *sym_rtrn,
    
    590
    +XkbTranslateKeySym(Display *dpy,
    
    591
    +                   KeySym *sym_rtrn,
    
    592 592
                        unsigned int mods,
    
    593 593
                        char *buffer,
    
    594 594
                        int nbytes,
    


  • Reply to: