Index: native_client_sdk/src/libraries/nacl_io/mount_node.cc |
diff --git a/native_client_sdk/src/libraries/nacl_io/mount_node.cc b/native_client_sdk/src/libraries/nacl_io/mount_node.cc |
index 5fb32902902ad1b53fabb0b3c0079f47dd1d9829..ff722b44eb5c7d40e271e7e2f38b6b1882daaaa4 100644 |
--- a/native_client_sdk/src/libraries/nacl_io/mount_node.cc |
+++ b/native_client_sdk/src/libraries/nacl_io/mount_node.cc |
@@ -25,8 +25,11 @@ MountNode::MountNode(Mount* mount) |
stat_.st_uid = USR_ID; |
// Mount should normally never be NULL, but may be null in tests. |
+ // If NULL, at least set the inode to a valid (nonzero) value. |
if (mount_) |
mount_->OnNodeCreated(this); |
+ else |
+ stat_.st_ino = 1; |
} |
MountNode::~MountNode() { |