Revision: 2041 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=2041&view=re... Author: frlan Date: 2011-04-22 23:56:24 +0000 (Fri, 22 Apr 2011)
Log Message: ----------- Codenav: Move debug some output after NULL-pointer check to prevent from NULL-pointer dereferencing.
Modified Paths: -------------- trunk/geany-plugins/codenav/ChangeLog trunk/geany-plugins/codenav/src/switch_head_impl.c
Modified: trunk/geany-plugins/codenav/ChangeLog =================================================================== --- trunk/geany-plugins/codenav/ChangeLog 2011-04-22 23:43:20 UTC (rev 2040) +++ trunk/geany-plugins/codenav/ChangeLog 2011-04-22 23:56:24 UTC (rev 2041) @@ -1,3 +1,12 @@ +2011-04-23 Frank Lanitz frlan@frank.uvena.de + + * src/switch_head_impl.c: + Move debug some output after NULL-pointer check to prevent from + NULL-pointer dereferencing. + + + + 2009-10-14 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/codenavigation.c: @@ -9,4 +18,3 @@
* src/codenav.c: Initial import implementation / header switching works but is not configurable -
Modified: trunk/geany-plugins/codenav/src/switch_head_impl.c =================================================================== --- trunk/geany-plugins/codenav/src/switch_head_impl.c 2011-04-22 23:43:20 UTC (rev 2040) +++ trunk/geany-plugins/codenav/src/switch_head_impl.c 2011-04-22 23:56:24 UTC (rev 2041) @@ -221,12 +221,12 @@ gchar* p_str = NULL; /* Local variables, used as temporary buffers */ gchar* p_str2 = NULL;
- log_func(); - log_debug("current_doc->file_name == %s", current_doc->file_name); - log_debug("geany->documents_array->len == %d", geany->documents_array->len); - if(current_doc != NULL && current_doc->file_name != NULL && current_doc->file_name[0] != '\0') { + log_func(); + log_debug("current_doc->file_name == %s", current_doc->file_name); + log_debug("geany->documents_array->len == %d", geany->documents_array->len); + /* Get the basename, e.g. : "/home/me/file.cpp" -> "file.cpp" */ basename = g_path_get_basename(current_doc->file_name);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.