Permalink
Browse files

missing error handling for mapping a null physical address

  • Loading branch information...
1 parent 75a2e03 commit 7c90a376f4424e6e053cc9f130c80fe5f9e41137 @wolfwood wolfwood committed Aug 13, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 kernel/arch/x86_64/core/paging.d
@@ -354,6 +354,9 @@ public:
T* segmentParent;
PhysicalAddress locationAddr = getPhysicalAddressOfSegment!(typeof(segmentParent))(location), oldRoot;
+ if(locationAddr is null)
+ return ErrorVal.Fail;
+
if(destinationRoot !is null){
// Goto the other address space
switchAddressSpace(destinationRoot, oldRoot);

0 comments on commit 7c90a37

Please sign in to comment.