Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows/port.cc:TmpFile returns a pointer to a local varaible #43

Closed
GoogleCodeExporter opened this issue Aug 14, 2015 · 1 comment
Closed

Comments

@GoogleCodeExporter
Copy link

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.


Original issue reported on code.google.com by jrl...@gmail.com on 7 Oct 2009 at 9:15

@GoogleCodeExporter
Copy link
Author

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? :-)

Original comment by csilv...@gmail.com on 12 Oct 2009 at 12:18

  • Changed state: WontFix
  • Added labels: Priority-Medium, Type-Defect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant