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

Non NULL terminated strings and strcmp #635

Closed
artemp opened this issue Apr 21, 2016 · 1 comment
Closed

Non NULL terminated strings and strcmp #635

artemp opened this issue Apr 21, 2016 · 1 comment
Milestone

Comments

@artemp
Copy link
Member

artemp commented Apr 21, 2016

I see a lot of code snippets like

if (strcmp(*v8::String::Utf8Value(format_val), "jpeg") == 0) {}

So it's possible to have format_val = 'jpeg\0bonkers big bytes by bad buddy blows ....big bang`
Does anyone see an issue here ?

/cc @lightmare @springmeyer
Also, it's considered a good practice to prefix "C" library functions with std when used in c++

@springmeyer
Copy link
Member

:+1 to fix. Looks like these are only in src/blend.cpp which means they are carry over from the node-blend port to node-mapnik.

@springmeyer springmeyer added this to the v3.5.14 milestone Sep 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants