New issue 44 by jrleek: windows/port.cc:TmpFile returns a pointer to a
local varaible
http://code.google.com/p/google-sparsehash/issues/detail?id=44
We found this bug with a static analysis tool. It's an easy fix. Line 55
of src/windows/port.cc has:
char tmppath_buffer[1024];
line 62 has:
return tmppath_buffer;
oops.
What version of the product are you using? On what operating system?
I found this in version 1.3, but it's still there in 1.5.2.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
Comment #1 on issue 44 by csilvers: windows/port.cc:TmpFile returns a
pointer to a local varaible
http://code.google.com/p/google-sparsehash/issues/detail?id=44
This is actually fine -- the function returns a string, not a pointer, so
the local
buffer is converted to a string before being returned.
I'm closing this as NotABug. Though maybe it's a good bug to file with the
static
analysis tool? :-)