For some reason (?), reportbug did not sent the attached files (at
least, I do not see them in the bug report...). For sure, they were in
the reportbug's temp. file, so I expected that reportbug -r would send
them... Or maybe some more option was needed(?).
Anyway - patch, this time, attached.
Regards,
Tomasz
Description: fix segfault on accessing a virtual drive
This patch applies fix for the bug #1541 - a segfault when a file is
loaded from a virtual drive, but the drive's directory does not exist.
(The bug is already fixed in upstream with these exact changes).
Origin: upstream, (https://sourceforge.net/p/vice-emu/code/42872/)
Bug: https://sourceforge.net/p/vice-emu/bugs/1541/
Forwarded: not-needed
Applied-Upstream: 3.8, (https://sourceforge.net/p/vice-emu/code/42872/)
Last-Update: 2024-06-14
--- vice-3.7.1+dfsg1.orig/src/fileio/fileio.c
+++ vice-3.7.1+dfsg1/src/fileio/fileio.c
@@ -43,6 +43,10 @@ fileio_info_t *fileio_open(const char *f
fileio_info_t *info = NULL;
char *new_file, *new_path;
+ if (file_name == NULL || *file_name == '\0') {
+ return NULL;
+ }
+
if ((command & FILEIO_COMMAND_FSNAME) && path == NULL) {
util_fname_split(file_name, &new_path, &new_file);
} else {
--- vice-3.7.1+dfsg1.orig/src/fsdevice/fsdevice-filename.c
+++ vice-3.7.1+dfsg1/src/fsdevice/fsdevice-filename.c
@@ -196,6 +196,9 @@ static char *expand_shortname(vdrive_t *
DBG(("expand_shortname path '%s'\n", prefix));
host_dir = archdep_opendir(prefix, ARCHDEP_OPENDIR_ALL_FILES);
+ if (host_dir == NULL) {
+ return NULL;
+ }
while(1) {
direntry = archdep_readdir(host_dir);
exclude_linenoise-ng.patch
revert_linenoise-ng.patch
revert_to_CBM.ttf.patch
fix_segfault_on_accessing_virtual_drive.patch