[Git][xorg-team/lib/libxpm][upstream-unstable] 20 commits: Remove outdated ifdef checks for including stdint.h

"Emilio Pozuelo Monfort (@pochu)" <[email protected]>
Newsgroups gmane.linux.debian.devel.x
Message-ID <[email protected]>

Emilio Pozuelo Monfort pushed to branch upstream-unstable at X Strike Force / lib / libxpm


Commits:
b4e21776 by Alan Coopersmith at 2024-02-17T14:56:49-08:00
Remove outdated ifdef checks for including stdint.h

Assumes all platforms have provided C99 required headers in the 25 years
since the C99 standard was finalized.

Signed-off-by: Alan Coopersmith <[email protected]>

- - - - -
02702c20 by Alan Coopersmith at 2024-02-19T13:28:36-08:00
unifdef sequent

Signed-off-by: Alan Coopersmith <[email protected]>

- - - - -
b72af4ed by Alan Coopersmith at 2024-02-19T13:51:05-08:00
unifdef VAX11C

Signed-off-by: Alan Coopersmith <[email protected]>

- - - - -
0224b430 by Alan Coopersmith at 2024-02-19T13:51:26-08:00
Remove ancient Amiga support

There was no way to build this in the automake files

Signed-off-by: Alan Coopersmith <[email protected]>

- - - - -
b30fd091 by Alan Coopersmith at 2024-02-19T14:37:23-08:00
Remove ancient port to 16-bit Windows without X11 libraries

Removes all the "FOR_MSW" code added back in 1994, which hasn't been
buildable in the automake builds.

Signed-off-by: Alan Coopersmith <[email protected]>

- - - - -
73b69d79 by Alan Coopersmith at 2024-02-19T14:48:46-08:00
Remove xpmstrcasecmp fallback for strcasecmp

It was only ever used when FOR_MSW was defined, never in the autoconf builds

Signed-off-by: Alan Coopersmith <[email protected]>

- - - - -
bdb6c75f by Alan Coopersmith at 2024-02-19T14:53:05-08:00
Remove xpmstrdup fallback for strdup

It has never been used in the autoconf builds

Signed-off-by: Alan Coopersmith <[email protected]>

- - - - -
28039296 by Alan Coopersmith at 2024-11-11T10:03:10-08:00
Use _stricmp() instead of strcasecmp() on Windows

v2: Exclude include of <strings.h> as well

Fixes: 73b69d7 ("Remove xpmstrcasecmp fallback for strcasecmp")
Signed-off-by: Alan Coopersmith <[email protected]>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxpm/-/merge_requests/25>

- - - - -
b7309b49 by Peter Harris at 2024-11-11T10:55:50-08:00
Fix build with current Windows headers

Signed-off-by: Alan Coopersmith <[email protected]>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxpm/-/merge_requests/25>

- - - - -
854c23a7 by Bjarni Ingi Gislason at 2025-04-19T12:39:08-07:00
XpmCreateBuffer.3: editorial changes for this man page [Debian bug #1102886]

Originally from https://bugs.debian.org/1102886

Signed-off-by: Alan Coopersmith <[email protected]>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxpm/-/merge_requests/26>

- - - - -
3aa8a1e4 by Alan Coopersmith at 2025-04-19T12:39:15-07:00
man pages: make indentation arguments to .IP be numeric

Fixes warnings of the form:
troff:man/XpmMisc.3:49: warning: expected numeric expression, got 'l'

Signed-off-by: Alan Coopersmith <[email protected]>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxpm/-/merge_requests/26>

- - - - -
3ba5d813 by Alan Coopersmith at 2025-04-19T12:39:15-07:00
man pages: ensure .BR macro has multiple arguments

Fixes these warnings:
an.tmac:man/XpmCreateImage.3:87: style: .BR expects at least 2 arguments, got 1
an.tmac:man/XpmCreateXpmImage.3:103: style: .BR expects at least 2 arguments, got 1
an.tmac:man/XpmMisc.3:74: style: .BR expects at least 2 arguments, got 1
an.tmac:man/XpmWrite.3:153: style: .BR expects at least 2 arguments, got 1

Signed-off-by: Alan Coopersmith <[email protected]>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxpm/-/merge_requests/26>

- - - - -
60ee362e by Alan Coopersmith at 2025-04-22T15:43:07-07:00
man pages: remove .PP after .SH or .SS lines

Fixes warnings of the form:
mandoc: XpmMisc.3:65:2: WARNING: skipping paragraph macro: PP after SH
mandoc: XpmRead.3:70:2: WARNING: skipping paragraph macro: PP after SS

Signed-off-by: Alan Coopersmith <[email protected]>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxpm/-/merge_requests/26>

- - - - -
7ce39592 by Alan Coopersmith at 2025-04-22T16:23:12-07:00
man pages: adjust line breaks in source files

Clears warnings of the form:
mandoc: sxpm.1:72:83: STYLE: input text line longer than 80 bytes:
 Read from the file \...

Signed-off-by: Alan Coopersmith <[email protected]>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxpm/-/merge_requests/26>

- - - - -
5679dd6b by Zayd Rajab at 2025-08-27T19:12:22-04:00
tests: poll for stable compressed output

libXpm runs the compressor via a double fork. The previous fixed sleep
could race on slow or busy runners, yielding 'gzip: stdin: unexpected
end of file'.

Replace the fixed sleep with wait_for_stable_file(): poll the output
path every 10 ms until it exists and stops changing (mtime/size stable
for 200 ms), with a 10s timeout (configurable).

Signed-off-by: Zayd Rajab <[email protected]>

- - - - -
10070a4e by Alan Coopersmith at 2025-08-30T11:26:54-07:00
Strip trailing whitespace from source files

Performed with: `git ls-files | xargs perl -i -p -e 's{[ \t]+$}{}'`

`git diff -w` & `git diff -b` show no diffs from this change

Signed-off-by: Alan Coopersmith <[email protected]>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxpm/-/merge_requests/29>

- - - - -
a5549ac1 by Alan Coopersmith at 2026-01-25T16:03:05-08:00
gitlab CI: drop the ci-fairy check-mr job

The only thing this checked was the checkbox for allowing maintainers to
edit the MR. Changed permissions checks now fail this job but luckily
the setting it checked has been the default for years anyway so we can
drop it.

https://gitlab.freedesktop.org/freedesktop/ci-templates/-/issues/81

Signed-off-by: Alan Coopersmith <[email protected]>

- - - - -
5b7e9030 by Alan Coopersmith at 2026-01-25T16:05:09-08:00
libXpm 3.5.18

Signed-off-by: Alan Coopersmith <[email protected]>

- - - - -
5448e1bd by Olivier Fourdan at 2026-04-21T13:55:58+02:00
Fix CVE-2026-4367: Out-of-bounds read in xpmNextWord()

xpmNextWord() checks for the terminator character to detect the end of
the file, but a very small malformed XPM file may cause the function to
read past the end of the buffer, causing out-of-bound reads:

  == Invalid read of size 1
  ==    at 0x48AD3A4: xpmParseColors (parse.c:239)
  ==    by 0x48AF9D8: xpmParseData (parse.c:783)
  ==    by 0x48B1C18: XpmCreateXpmImageFromBuffer (CrIFrBuf.c:101)
  ==    by 0x4005A6: main ()
  ==  Address 0x4c413bf is 0 bytes after a block of size 15 alloc'd
  ==    at 0x4841B26: malloc (vg_replace_malloc.c:447)
  ==    by 0x48B2809: XpmReadFileToBuffer (RdFToBuf.c:96)
  ==    by 0x400554: main ()
  ==
  == Invalid read of size 1
  ==    at 0x48AC8D5: xpmNextWord.constprop.0 (data.c:262)
  ==    by 0x48AD492: xpmParseColors (parse.c:266)
  ==    by 0x48AF9D8: xpmParseData (parse.c:783)
  ==    by 0x48B1C18: XpmCreateXpmImageFromBuffer (CrIFrBuf.c:101)
  ==    by 0x4005A6: main ()
  ==  Address 0x4c413c0 is 1 bytes after a block of size 15 alloc'd
  ==    at 0x4841B26: malloc (vg_replace_malloc.c:447)
  ==    by 0x48B2809: XpmReadFileToBuffer (RdFToBuf.c:96)
  ==    by 0x400554: main ()
  ==
  == Invalid read of size 1
  ==    at 0x48AC965: xpmNextWord.constprop.0 (data.c:265)
  ==    by 0x48AD492: xpmParseColors (parse.c:266)
  ==    by 0x48AF9D8: xpmParseData (parse.c:783)
  ==    by 0x48B1C18: XpmCreateXpmImageFromBuffer (CrIFrBuf.c:101)
  ==    by 0x4005A6: main ()
  ==  Address 0x4c413c0 is 1 bytes after a block of size 15 alloc'd
  ==    at 0x4841B26: malloc (vg_replace_malloc.c:447)
  ==    by 0x48B2809: XpmReadFileToBuffer (RdFToBuf.c:96)
  ==    by 0x400554: main ()

The problem actually comes from xpmNextString() and xpmParseColors():

1) xpmNextString() checks for the NULL terminator when looking for the
   end of the string (Eos) but not when looking for the beginning of the
   next string (Bos).

2) xpmParseColors() does not check the return value from xpmNextString()
   and continues even when xpmNextString() raised an invalid XPM file.

To avoid the issue, fix xpmNextString() to check for the NULL string
terminator when looking for the beginning of the next string and fix
xpmParseColors() to stop when xpmNextString() reported an invalid XPM
error.

CVE-2026-4367

This vulnerability was discovered by:
Naoki Wakamatsu

v2: Fix the XPM 1 code path the same.

Signed-off-by: Olivier Fourdan <[email protected]>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxpm/-/merge_requests/31>

- - - - -
9a05472d by Olivier Fourdan at 2026-04-21T13:56:22+02:00
libXpm 3.5.19

Signed-off-by: Olivier Fourdan <[email protected]>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxpm/-/merge_requests/31>

- - - - -


38 changed files:

- .gitignore
- .gitlab-ci.yml
- configure.ac
- doc/Makefile.am
- − doc/README.AMIGA
- − doc/README.MSW
- include/X11/xpm.h
- man/XpmCreateBuffer.man
- man/XpmCreateData.man
- man/XpmCreateImage.man
- man/XpmCreatePixmap.man
- man/XpmCreateXpmImage.man
- man/XpmMisc.man
- man/XpmRead.man
- man/XpmWrite.man
- man/cxpm.man
- man/sxpm.man
- src/CrBufFrI.c
- src/CrDatFrI.c
- src/Makefile.am
- src/RdFToBuf.c
- src/RdFToI.c
- src/WrFFrI.c
- src/XpmI.h
- − src/amigax.c
- − src/amigax.h
- src/create.c
- src/data.c
- src/misc.c
- src/parse.c
- src/rgb.c
- − src/rgbtab.h
- src/scan.c
- − src/simx.c
- − src/simx.h
- test/XpmWrite.c
- test/pixmaps/good/chromesphere.xpm
- test/pixmaps/good/jigglymap.xpm


The diff was not included because it is too large.


View it on GitLab: https://salsa.debian.org/xorg-team/lib/libxpm/-/compare/a154f12b6e56f131bd5880fc96f11615ff940b29...9a05472d7ebcdf6deaa970515f3ddba2b0fc265e

-- 
View it on GitLab: https://salsa.debian.org/xorg-team/lib/libxpm/-/compare/a154f12b6e56f131bd5880fc96f11615ff940b29...9a05472d7ebcdf6deaa970515f3ddba2b0fc265e
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.