Skip to content

Commit

Permalink
Fixed panic in MojoPlatform_readlink() if the symlink is missing.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Dec 10, 2011
1 parent caafc4c commit ee4f232
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platform_unix.c
Expand Up @@ -124,7 +124,7 @@ char *MojoPlatform_readlink(const char *linkname)
buf[len] = '\0'; // readlink() doesn't null-terminate!
retval = xrealloc(buf, (size_t) (len+1)); // shrink it down.
} // if
} while (len >= (alloclen-1)); // loop if we need a bigger buffer.
} while (len >= (((ssize_t)alloclen)-1)); // loop if we need bigger buf.

return retval; // caller must free() this.
} // MojoPlatform_readlink
Expand Down

0 comments on commit ee4f232

Please sign in to comment.