parent
d3d6aebbd1
commit
a0b3041589
@ -0,0 +1,84 @@
|
||||
From 706b54502b1d3ccb179a4d8b91c585e152bbae81 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Larsson <alexl@redhat.com>
|
||||
Date: Mon, 25 May 2009 10:33:59 +0200
|
||||
Subject: [PATCH 3/6] cdda: Handle invalid data (#582303)
|
||||
|
||||
Fix for CAN-2005-0706, handle negative values that may appear when
|
||||
there is invalid input. Patch from openSUSE.
|
||||
|
||||
Note: cdda is disabled by default, so this doesn't affect all users.
|
||||
---
|
||||
modules/cdda-cddb.c | 36 +++++++++++++++++++++---------------
|
||||
1 files changed, 21 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/modules/cdda-cddb.c b/modules/cdda-cddb.c
|
||||
index ce83b52..0ec4e25 100644
|
||||
--- a/modules/cdda-cddb.c
|
||||
+++ b/modules/cdda-cddb.c
|
||||
@@ -537,26 +537,30 @@ static void CDDBProcessLine(char *inbuffer,DiscData *data,
|
||||
else if(!g_ascii_strncasecmp(inbuffer,"TTITLE",6)) {
|
||||
track=atoi(strtok(inbuffer+6,"="));
|
||||
|
||||
- if(track<numtracks)
|
||||
+ if(track >= 0 && track<numtracks)
|
||||
+ {
|
||||
len=strlen(data->data_track[track].track_name);
|
||||
|
||||
- strncpy(data->data_track[track].track_name+len,
|
||||
+ strncpy(data->data_track[track].track_name+len,
|
||||
ChopWhite(strtok(NULL,"")),256-len);
|
||||
+ }
|
||||
}
|
||||
else if(!g_ascii_strncasecmp(inbuffer,"TARTIST",7)) {
|
||||
data->data_multi_artist=TRUE;
|
||||
|
||||
track=atoi(strtok(inbuffer+7,"="));
|
||||
|
||||
- if(track<numtracks)
|
||||
+ if(track >= 0 && track<numtracks)
|
||||
+ {
|
||||
len=strlen(data->data_track[track].track_artist);
|
||||
|
||||
- st = strtok(NULL, "");
|
||||
- if(st == NULL)
|
||||
- return;
|
||||
-
|
||||
- strncpy(data->data_track[track].track_artist+len,
|
||||
+ st = strtok(NULL, "");
|
||||
+ if(st == NULL)
|
||||
+ return;
|
||||
+
|
||||
+ strncpy(data->data_track[track].track_artist+len,
|
||||
ChopWhite(st),256-len);
|
||||
+ }
|
||||
}
|
||||
else if(!g_ascii_strncasecmp(inbuffer,"EXTD",4)) {
|
||||
len=strlen(data->data_extended);
|
||||
@@ -566,15 +570,17 @@ static void CDDBProcessLine(char *inbuffer,DiscData *data,
|
||||
else if(!g_ascii_strncasecmp(inbuffer,"EXTT",4)) {
|
||||
track=atoi(strtok(inbuffer+4,"="));
|
||||
|
||||
- if(track<numtracks)
|
||||
+ if(track >= 0 && track<numtracks)
|
||||
+ {
|
||||
len=strlen(data->data_track[track].track_extended);
|
||||
|
||||
- st = strtok(NULL, "");
|
||||
- if(st == NULL)
|
||||
- return;
|
||||
-
|
||||
- strncpy(data->data_track[track].track_extended+len,
|
||||
- ChopWhite(st),4096-len);
|
||||
+ st = strtok(NULL, "");
|
||||
+ if(st == NULL)
|
||||
+ return;
|
||||
+
|
||||
+ strncpy(data->data_track[track].track_extended+len,
|
||||
+ ChopWhite(st),4096-len);
|
||||
+ }
|
||||
}
|
||||
else if(!g_ascii_strncasecmp(inbuffer,"PLAYORDER",5)) {
|
||||
len=strlen(data->data_playlist);
|
||||
--
|
||||
1.6.3.3
|
||||
|
@ -0,0 +1,26 @@
|
||||
From f732047ada92a99f1f0cd3ceb7b76499789990f8 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Larsson <alexl@redhat.com>
|
||||
Date: Mon, 25 May 2009 10:37:14 +0200
|
||||
Subject: [PATCH 4/6] Mark netware mounts as non-local (#582304)
|
||||
|
||||
Filesystems of type "novfs" come from Novell Client for Linux, i.e.
|
||||
they are remote Netware mounts.
|
||||
---
|
||||
modules/file-method.c | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/modules/file-method.c b/modules/file-method.c
|
||||
index b74535d..37e4853 100644
|
||||
--- a/modules/file-method.c
|
||||
+++ b/modules/file-method.c
|
||||
@@ -1273,6 +1273,7 @@ do_is_local (GnomeVFSMethod *method,
|
||||
(strcmp (type, "afs") != 0) &&
|
||||
(strcmp (type, "autofs") != 0) &&
|
||||
(strcmp (type, "unknown") != 0) &&
|
||||
+ (strcmp (type, "novfs") != 0) &&
|
||||
(strcmp (type, "ncpfs") != 0));
|
||||
G_UNLOCK (fstype);
|
||||
} else {
|
||||
--
|
||||
1.6.3.3
|
||||
|
@ -0,0 +1,26 @@
|
||||
From bd5a83f1a6327cbb376ec4915f252f292b5bfb07 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Larsson <alexl@redhat.com>
|
||||
Date: Mon, 25 May 2009 10:41:34 +0200
|
||||
Subject: [PATCH 5/6] Don't pass in lengths > 64k to smb (#582308)
|
||||
|
||||
There seem to be some limitation in smb that makes this not work.
|
||||
---
|
||||
modules/smb-method.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/modules/smb-method.c b/modules/smb-method.c
|
||||
index 8042a61..42d6c78 100644
|
||||
--- a/modules/smb-method.c
|
||||
+++ b/modules/smb-method.c
|
||||
@@ -1646,7 +1646,7 @@ do_read (GnomeVFSMethod *method,
|
||||
|
||||
/* Important: perform_authentication leaves and re-enters the lock! */
|
||||
while (perform_authentication (&actx) > 0) {
|
||||
- n = smb_context->read (smb_context, handle->file, buffer, num_bytes);
|
||||
+ n = smb_context->read (smb_context, handle->file, buffer, MIN (USHRT_MAX, num_bytes));
|
||||
actx.res = (n >= 0) ? GNOME_VFS_OK : gnome_vfs_result_from_errno ();
|
||||
}
|
||||
|
||||
--
|
||||
1.6.3.3
|
||||
|
@ -0,0 +1,31 @@
|
||||
|
||||
gnome-vfs-daemon reads /proc/mounts at startup and uses HAL via
|
||||
libhal_drive_from_device_file() in multiple places in gnome-vfs-hal-mounts.c
|
||||
|
||||
Strings in DBUS must be valid UTF8. If the device path is not valid UTF8,
|
||||
dbus_connection_send() will cause a disconnect of the caller and an exit.
|
||||
|
||||
Threfore if the device path contains invalid utf8, gnome-vfs-daemon will fail
|
||||
to start. If that happens during a session, gnome-vfs-daemon will be restarted
|
||||
by any gnome application wich cause a lot of start/stop of gnome-vfs-daemon.
|
||||
|
||||
The following patch simply ensures that we use valid utf8 for device path to
|
||||
avoid problems with hal/dbus.
|
||||
|
||||
Olivier Fourdan <ofourdan@redhat.com>
|
||||
|
||||
gnome-vfs-volume-monitor-daemon.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff -up gnome-vfs-2.16.2/libgnomevfs/gnome-vfs-volume-monitor-daemon.c.utf8-mount gnome-vfs-2.16.2/libgnomevfs/gnome-vfs-volume-monitor-daemon.c
|
||||
--- gnome-vfs-2.16.2/libgnomevfs/gnome-vfs-volume-monitor-daemon.c.utf8-mount 2009-07-07 06:10:24.000000000 -0400
|
||||
+++ gnome-vfs-2.16.2/libgnomevfs/gnome-vfs-volume-monitor-daemon.c 2009-07-07 06:10:34.000000000 -0400
|
||||
@@ -874,7 +874,7 @@ create_vol_from_mount (GnomeVFSVolumeMon
|
||||
vol = g_object_new (GNOME_VFS_TYPE_VOLUME, NULL);
|
||||
|
||||
vol->priv->volume_type = GNOME_VFS_VOLUME_TYPE_MOUNTPOINT;
|
||||
- vol->priv->device_path = g_strdup (mount->device_path);
|
||||
+ vol->priv->device_path = make_utf8 (mount->device_path);
|
||||
vol->priv->unix_device = 0; /* Caller must fill in. */
|
||||
vol->priv->activation_uri = gnome_vfs_get_uri_from_local_path (mount->mount_path);
|
||||
vol->priv->filesystem_type = g_strdup (mount->filesystem_type);
|
Loading…
Reference in new issue