PrintDebug(info->vm_info, info, "32 bit PAE shadow paging page fault handler: %p\n", (void*)fault_addr);
PrintDebug(info->vm_info, info, "Handling PDP fault\n");
- if (v3_gpa_to_hva(info, guest_cr3, (addr_t*)guest_pdp) == -1) {
+ if (v3_gpa_to_hva(info, guest_cr3, (addr_t*)&guest_pdp) == -1) {
PrintError(info->vm_info, info, "Invalid Guest PDPE Address: 0x%p\n", (void *)guest_cr3);
return -1;
}
// Note, assumes virtual contiguity in the host OS...
+ // A null deref here can only happen if the host does not provide the
+ // physical_to_virtual functions or if they do not work
memcpy(V3_VAddr((void*)new_hpa), V3_VAddr((void*)(reg->host_addr)), num_pages*PAGE_SIZE);
old_hpa = (void*)(reg->host_addr);
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');
}
- if (parent->guest_start > guest_addr) {
+ if (!parent || parent->guest_start > guest_addr) {
return parent;
} else if (parent->guest_end < guest_addr) {
struct rb_node * node = &(parent->tree_node);