libcdio/fix-undefined-behavior-in-readlink.patch
Matej Cepl c5b9f8129f - Update to 2.1.1:
- More checks of potentially NULL buffers. More
    malloc()/calloc() result checks.
  - Enforce non-widestring ("A" suffixed) calls when we pass
    char* parameters.
  - Use widestring API calls unless otherwise specified.
  - Remove a deprecation warning of the declaration of
    is_cdrom_aspi() and GetVersion().
  - Updates for compiling on MSVC.
  - Move to github
  - Add github CI checks.
  - Count empty fields as tracks.
  - Add some validity checks to enhance security.
  - Add support for ISO9660 multi extent files.
  - Fix Recognition of multi-extent in ISO9660 when Joliet is
    present.
  - Use getmntent/setmntent for reading mounts.
  - Use GNU/Linux new ioctl on kernel v5.16 or newer.
  - Use "%s"-style format in cdda-player.c: to make it catch
    cases when user input is used in place of format.
  - Remove some memory leaks in C++ code.
  - Allow for DO_NOT_WANT_COMPATIBILITY macro in config.h to
    disable APIs that are being retired.
  - Fix win32 implementation of .get_track_msf() for CD with
    first track number > 1
  - Fix testing on Windows and remove compilation warnings.
  - Add Rock Ridge deep directory support.
  - Fix and clean up various Rock Ridge issues and adjust tests.
  - Fix double reporting of sizes in cd-info.c.
  - CD-Text character set interpretation more tolerant of bad
    input.
  - Remove homegrown boolean type in favor of <stdbool.h>.
  - Improve pkg-config configuration detection
  - Fix crash reading CD TOC on macOS Ventura.
  - Update freedb references to GnuDB.
  - Fix charset check in Windows cdio_charset_from_utf8
    implementation.
  - Add support for reading CD-Text on macOS and Windows
- Remove upstreamed patch:
  - fix-undefined-behavior-in-readlink.patch
- Remove GPG authentication, not supported any more.

OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libcdio?expand=0&rev=78
2025-01-10 12:33:52 +00:00

53 lines
1.9 KiB
Diff

From 56335fff0f21d294cd0e478d49542a43e9495ed0 Mon Sep 17 00:00:00 2001
From: "R. Bernstein" <rocky@gnu.org>
Date: Wed, 24 Aug 2022 14:34:33 -0400
Subject: [PATCH] Correct realpath test failure
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
See https://savannah.gnu.org/bugs/?62948
Patch courtesy of Martin Liška <marxin>
---
test/driver/realpath.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/test/driver/realpath.c b/test/driver/realpath.c
index 289253e4..cd46d620 100644
--- a/test/driver/realpath.c
+++ b/test/driver/realpath.c
@@ -1,5 +1,7 @@
/* -*- C -*-
- Copyright (C) 2010-2012, 2015, 2017 Rocky Bernstein <rocky@gnu.org>
+
+ Copyright (C) 2010-2012, 2015, 2017, 2022 Rocky Bernstein
+ <rocky@gnu.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -175,16 +177,17 @@ main(int argc, const char *argv[])
rc = check_rc(symlink(psz_symlink_file, psz_symlink_file),
"symlink", psz_symlink_file);
if (0 == rc) {
- cdio_realpath(psz_symlink_file, psz_file_check);
- if (0 != strncmp(psz_file_check, symlink_file, PATH_MAX)) {
+ char *retvalue = cdio_realpath(psz_symlink_file, psz_file_check);
+ if (0 != retvalue) {
+ if (0 != strncmp(psz_file_check, symlink_file, PATH_MAX)) {
fprintf(stderr, "direct cdio_realpath cycle test failed. %s vs %s\n",
psz_file_check, symlink_file);
rc = 5;
goto err_exit;
+ }
+ check_rc(unlink(psz_symlink_file), "unlink", psz_symlink_file);
}
- check_rc(unlink(psz_symlink_file), "unlink", psz_symlink_file);
}
-
}
check_rc(unlink(psz_orig_file), "unlink", psz_orig_file);
--
2.37.2