Commit dfc585b3 authored by Elliot Lee's avatar Elliot Lee

Allocate an extra byte in the buffer, for safety's sake. Fix back/fwd



* libnautilus/nautilus-directory.c: Allocate an extra byte in the
  buffer, for safety's sake.
* src/ntl-window-msgs.c: Fix back/fwd buttons.
parent 482a598e
2000-01-21 Elliot Lee <sopwith@redhat.com> 2000-01-21 Elliot Lee <sopwith@redhat.com>
* libnautilus/nautilus-directory.c: Allocate an extra byte in the
buffer, for safety's sake.
* src/ntl-window-msgs.c: Fix back/fwd buttons.
* src/ntl-window-msgs.c: Remove debugging printouts, and display error dialogs. * src/ntl-window-msgs.c: Remove debugging printouts, and display error dialogs.
* src/ntl-window-msgs.c, src/ntl-window.h: Fix the bug that was causing list view to be blank. * src/ntl-window-msgs.c, src/ntl-window.h: Fix the bug that was causing list view to be blank.
2000-01-21 Darin Adler <darin@eazel.com> 2000-01-21 Darin Adler <darin@eazel.com>
......
...@@ -246,9 +246,10 @@ nautilus_directory_try_to_read_metafile (NautilusDirectory *directory, GnomeVFSU ...@@ -246,9 +246,10 @@ nautilus_directory_try_to_read_metafile (NautilusDirectory *directory, GnomeVFSU
} }
if (result == GNOME_VFS_OK) { if (result == GNOME_VFS_OK) {
char *buffer = g_alloca(size); char *buffer = g_alloca(size+1);
result = gnome_vfs_read (metafile_handle, buffer, size, &actual_size); result = gnome_vfs_read (metafile_handle, buffer, size, &actual_size);
buffer[size] = '\0';
directory->details->metafile_tree = xmlParseMemory (buffer, actual_size); directory->details->metafile_tree = xmlParseMemory (buffer, actual_size);
} }
......
...@@ -246,9 +246,10 @@ nautilus_directory_try_to_read_metafile (NautilusDirectory *directory, GnomeVFSU ...@@ -246,9 +246,10 @@ nautilus_directory_try_to_read_metafile (NautilusDirectory *directory, GnomeVFSU
} }
if (result == GNOME_VFS_OK) { if (result == GNOME_VFS_OK) {
char *buffer = g_alloca(size); char *buffer = g_alloca(size+1);
result = gnome_vfs_read (metafile_handle, buffer, size, &actual_size); result = gnome_vfs_read (metafile_handle, buffer, size, &actual_size);
buffer[size] = '\0';
directory->details->metafile_tree = xmlParseMemory (buffer, actual_size); directory->details->metafile_tree = xmlParseMemory (buffer, actual_size);
} }
......
...@@ -246,9 +246,10 @@ nautilus_directory_try_to_read_metafile (NautilusDirectory *directory, GnomeVFSU ...@@ -246,9 +246,10 @@ nautilus_directory_try_to_read_metafile (NautilusDirectory *directory, GnomeVFSU
} }
if (result == GNOME_VFS_OK) { if (result == GNOME_VFS_OK) {
char *buffer = g_alloca(size); char *buffer = g_alloca(size+1);
result = gnome_vfs_read (metafile_handle, buffer, size, &actual_size); result = gnome_vfs_read (metafile_handle, buffer, size, &actual_size);
buffer[size] = '\0';
directory->details->metafile_tree = xmlParseMemory (buffer, actual_size); directory->details->metafile_tree = xmlParseMemory (buffer, actual_size);
} }
......
...@@ -354,7 +354,7 @@ nautilus_window_has_really_changed(NautilusWindow *window) ...@@ -354,7 +354,7 @@ nautilus_window_has_really_changed(NautilusWindow *window)
static void static void
nautilus_window_free_load_info(NautilusWindow *window) nautilus_window_free_load_info(NautilusWindow *window)
{ {
#ifdef EXTREME_DEBUGGING #if defined(EXTREME_DEBUGGING)
g_message("-> FREE_LOAD_INFO <-"); g_message("-> FREE_LOAD_INFO <-");
#endif #endif
...@@ -369,7 +369,6 @@ nautilus_window_free_load_info(NautilusWindow *window) ...@@ -369,7 +369,6 @@ nautilus_window_free_load_info(NautilusWindow *window)
window->made_changes = 0; window->made_changes = 0;
window->state = NW_IDLE; window->state = NW_IDLE;
window->changes_pending = window->changes_pending =
window->is_back =
window->views_shown = window->views_shown =
window->view_bombed_out = window->view_bombed_out =
window->view_activation_complete = window->view_activation_complete =
......
...@@ -354,7 +354,7 @@ nautilus_window_has_really_changed(NautilusWindow *window) ...@@ -354,7 +354,7 @@ nautilus_window_has_really_changed(NautilusWindow *window)
static void static void
nautilus_window_free_load_info(NautilusWindow *window) nautilus_window_free_load_info(NautilusWindow *window)
{ {
#ifdef EXTREME_DEBUGGING #if defined(EXTREME_DEBUGGING)
g_message("-> FREE_LOAD_INFO <-"); g_message("-> FREE_LOAD_INFO <-");
#endif #endif
...@@ -369,7 +369,6 @@ nautilus_window_free_load_info(NautilusWindow *window) ...@@ -369,7 +369,6 @@ nautilus_window_free_load_info(NautilusWindow *window)
window->made_changes = 0; window->made_changes = 0;
window->state = NW_IDLE; window->state = NW_IDLE;
window->changes_pending = window->changes_pending =
window->is_back =
window->views_shown = window->views_shown =
window->view_bombed_out = window->view_bombed_out =
window->view_activation_complete = window->view_activation_complete =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment