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

Weave incorrectly assumes PyStrings are NUL-terminated (Trac #657) #1184

Closed
Tracked by #7
scipy-gitbot opened this issue Apr 25, 2013 · 1 comment
Closed
Tracked by #7
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected Migrated from Trac

Comments

@scipy-gitbot
Copy link

Original ticket http://projects.scipy.org/scipy/ticket/657 on 2008-04-26 by trac user jonny5532, assigned to unknown.

Weave incorrectly assumes that PyStrings are NUL terminated - they infact store the length separately. As a result, all conversions to/from std::strings can be unnecessarily truncated if they contain NUL characters as they go via char* arrays.

I have fixed this locally by changing the code surrounding PyString_FromString and PyString_AsString calls which convert to/from std::strings to also note the length of the string.

@person142
Copy link
Member

Closing since weave is no longer a part of SciPy. This issue is now tracked at scipy/weave#7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected Migrated from Trac
Projects
None yet
Development

No branches or pull requests

2 participants