Skip to content

Commit

Permalink
Fixed wrong variable use that could trigger a potential buffer overflow.
Browse files Browse the repository at this point in the history
While it could be used for running arbitrary code, it's not a security hole,
since the attacker would have to get you to run arbitrary code you downloaded
in the first place.  :)
  • Loading branch information
icculus committed Jul 30, 2009
1 parent 6510cc7 commit c272ccb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platform_unix.c
Expand Up @@ -954,7 +954,7 @@ void *MojoPlatform_dlopen(const uint8 *img, size_t len)

for (i = 0; (i < STATICARRAYLEN(dirs)) && (retval == NULL); i++)
{
if (testTmpDir(dirs[i], fname, len, tmpl))
if (testTmpDir(dirs[i], fname, sizeof (fname), tmpl))
{
const int fd = mkstemp(fname);
if (fd != -1)
Expand Down

0 comments on commit c272ccb

Please sign in to comment.