1
0
mirror of https://gitlab.gnome.org/GNOME/glib.git synced 2026-10-24 00:49:00 +03:00
Files
glib/gio
Philip Withnall 7a71141cc3 tests: Avoid a ubsan warning about passing NULL to strncmp()
The array data can be `NULL` if its length is zero.

This fixes the following CI failure:
```
322/425 glib:gio / socket-address                                              ERROR            0.08s   killed by signal 6 SIGABRT
――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――
stderr:
../gio/tests/socket-address.c:201:19: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/string.h:160:33: note: nonnull attribute specified here
    #0 0x000000431715  (/builds/GNOME/glib/_build/gio/tests/socket-address+0x431715) (BuildId: 7c5e418267aa2008af8e77f4d04c31913e26aad7)
    #1 0x7fdabec8c862  (/builds/GNOME/glib/_build/glib/libglib-2.0.so.0+0x28c862) (BuildId: 12f0fded04a8c0437c073a267547f1cb487b1b1d)
    #2 0x7fdabec7e1b2  (/builds/GNOME/glib/_build/glib/libglib-2.0.so.0+0x27e1b2) (BuildId: 12f0fded04a8c0437c073a267547f1cb487b1b1d)
    #3 0x7fdabec7e533  (/builds/GNOME/glib/_build/glib/libglib-2.0.so.0+0x27e533) (BuildId: 12f0fded04a8c0437c073a267547f1cb487b1b1d)
    #4 0x7fdabec7e533  (/builds/GNOME/glib/_build/glib/libglib-2.0.so.0+0x27e533) (BuildId: 12f0fded04a8c0437c073a267547f1cb487b1b1d)
    #5 0x7fdabec7e533  (/builds/GNOME/glib/_build/glib/libglib-2.0.so.0+0x27e533) (BuildId: 12f0fded04a8c0437c073a267547f1cb487b1b1d)
    #6 0x7fdabec7bc89  (/builds/GNOME/glib/_build/glib/libglib-2.0.so.0+0x27bc89) (BuildId: 12f0fded04a8c0437c073a267547f1cb487b1b1d)
    #7 0x7fdabec7b785  (/builds/GNOME/glib/_build/glib/libglib-2.0.so.0+0x27b785) (BuildId: 12f0fded04a8c0437c073a267547f1cb487b1b1d)
    #8 0x00000042de31  (/builds/GNOME/glib/_build/gio/tests/socket-address+0x42de31) (BuildId: 7c5e418267aa2008af8e77f4d04c31913e26aad7)
    #9 0x7fdabd810447  (/lib64/libc.so.6+0x3447) (BuildId: dae6ae6929d69dca842288f5300af5a33d1bdcd7)
    #10 0x7fdabd81050a  (/lib64/libc.so.6+0x350a) (BuildId: dae6ae6929d69dca842288f5300af5a33d1bdcd7)
    #11 0x0000004015a4  (/builds/GNOME/glib/_build/gio/tests/socket-address+0x4015a4) (BuildId: 7c5e418267aa2008af8e77f4d04c31913e26aad7)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../gio/tests/socket-address.c:201:19
```

https://gitlab.gnome.org/GNOME/glib/-/jobs/7120334

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2026-10-06 23:09:02 +01:00
..
2025-09-03 21:47:11 +02:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2022-10-13 20:53:56 -04:00
2024-05-09 15:03:55 +00:00
2026-06-25 17:59:14 +01:00
2022-10-13 20:53:56 -04:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2022-10-13 20:53:56 -04:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-01-26 15:38:04 +01:00
2022-10-13 20:53:56 -04:00
2026-06-25 17:59:14 +01:00
2022-10-13 20:53:56 -04:00
2026-06-25 17:59:14 +01:00
2026-01-26 15:38:04 +01:00
2026-01-26 15:38:04 +01:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2025-09-03 21:47:11 +02:00
2024-04-01 11:01:06 +00:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2025-09-03 21:47:11 +02:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2023-10-25 15:10:16 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-10-06 23:07:31 +01:00
2023-08-17 14:25:53 +01:00
2026-06-25 17:59:14 +01:00
2023-08-01 15:33:21 -03:00
2023-10-24 10:58:56 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2022-10-13 20:53:56 -04:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2025-12-04 09:53:50 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2023-11-02 16:30:23 +00:00
2026-06-25 17:59:14 +01:00
2022-10-13 20:53:56 -04:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-06-25 17:59:14 +01:00
2026-02-09 15:41:57 +00:00