diff options
author | sobomax <sobomax@FreeBSD.org> | 2001-12-20 22:04:25 +0800 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2001-12-20 22:04:25 +0800 |
commit | e260136272332b9b43da090e18498a0f4d897357 (patch) | |
tree | fe7e7ab43898083250adc78b33bbabb20e8dc202 /x11-toolkits/eel/files | |
parent | 8e1ca45d909404c95ccccfbe383aacbb3dd8f4a4 (diff) | |
download | freebsd-ports-gnome-e260136272332b9b43da090e18498a0f4d897357.tar.gz freebsd-ports-gnome-e260136272332b9b43da090e18498a0f4d897357.tar.zst freebsd-ports-gnome-e260136272332b9b43da090e18498a0f4d897357.zip |
In a function eel_read_entire_file() allocate extra byte and ensure that the
read buffer is terminated by '\0', because it seems that Nautilus expects it
to be. The proper fix would be to fix Nautilus instead, but I'll leave this
excersise to Nautilus developers. This should fix one of the most frequent
crashes I've saw in Nautilus so far. Bump PORTREVISION.
Recommended update.
Diffstat (limited to 'x11-toolkits/eel/files')
-rw-r--r-- | x11-toolkits/eel/files/patch-eel::eel-vfs-extensions.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/x11-toolkits/eel/files/patch-eel::eel-vfs-extensions.c b/x11-toolkits/eel/files/patch-eel::eel-vfs-extensions.c new file mode 100644 index 000000000000..a71c0f102a7b --- /dev/null +++ b/x11-toolkits/eel/files/patch-eel::eel-vfs-extensions.c @@ -0,0 +1,15 @@ + +$FreeBSD$ + +--- eel/eel-vfs-extensions.c 2001/12/20 13:41:21 1.1 ++++ eel/eel-vfs-extensions.c 2001/12/20 13:47:36 +@@ -116,7 +116,8 @@ + + /* Return the file. */ + *file_size = total_bytes_read; +- *file_contents = g_realloc (buffer, total_bytes_read); ++ *file_contents = g_realloc (buffer, total_bytes_read + 1); ++ (*file_contents)[total_bytes_read] = '\0'; + return GNOME_VFS_OK; + } + |