Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Cleanup and sanity-checking of explicit null derefs (Coverity static analysis)
[palacios.git] / palacios / src / palacios / vmm_debug.c
index c2401e8..85bd8d2 100644 (file)
@@ -406,17 +406,21 @@ void v3_print_backtrace(struct guest_info * core) {
                tmp_ptr += 3; // pass over symbol type
 
                if (sym_offset > rip_val) {
-                   char * end_ptr = strchr(sym_ptr, '\n');
-
-                   if (end_ptr) {
-                       *end_ptr = 0; // null terminate symbol...
+                   if (sym_ptr) {
+                       char * end_ptr = strchr(sym_ptr, '\n');
+                       
+                       if (end_ptr) {
+                           *end_ptr = 0; // null terminate symbol...
+                       }
+                       sym_name = sym_ptr;
+                   } else {
+                       sym_name = NULL;
                    }
-
-                   sym_name = sym_ptr;
                    break;
                }
 
                sym_ptr = tmp_ptr;
+
                { 
                    char * end_ptr2 = strchr(tmp_ptr, '\n');