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

Check return value of getcwd() #51

Open
bnoordhuis opened this issue Jun 26, 2017 · 1 comment
Open

Check return value of getcwd() #51

bnoordhuis opened this issue Jun 26, 2017 · 1 comment
Labels

Comments

@bnoordhuis
Copy link
Contributor

I noticed the following compiler warning:

../omr-agentcore/src/ibmras/monitoring/connector/headless/HLConnector.cpp: In member function 'void ibmras::monitoring::connector::headless::HLConnector::startNewTempDir()':
../omr-agentcore/src/ibmras/monitoring/connector/headless/HLConnector.cpp:206:40: warning: ignoring return value of 'char* getcwd(char*, size_t)', declared with attribute warn_unused_result [-Wunused-result]
  getcwd(cDirectory, sizeof(cDirectory));

cDirectory is used afterwards but will contain stack garbage if getcwd() failed.

@tobespc
Copy link
Member

tobespc commented Jun 26, 2017

thanks for the heads up

@tobespc tobespc added the bug label Jun 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants