-
Notifications
You must be signed in to change notification settings - Fork 14
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
replace usages of snprintf, sscanf #179
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub is forcing me to leave a comment
71b826a
to
83a02e5
Compare
Maybe it’s a good idea to add some tests for the version parser? It looks better but it’s hard to tell from just looking. Would help if you wanted to change it to nom later as well. |
I like these changes, but not sure about Same also with |
226a65f
to
533a538
Compare
If it is already in master, I'm not against. |
Personally i think |
Doesn’t every c2rust-generated “0 as *const _” have a corresponding explicit type annotation anyway, even in method bodies? I have been keeping the annotation but replacing the 0 with ptr::null. |
Seems good. Just need to fix compile errors on Mac (seems extern types doesn't work well together with ptr::null()?) and Windows (are we still calling vsprintf from somewhere?), and we're good to go~ |
0b2868c
to
aadbe09
Compare
fastmod -m -d . --extensions rs \ "(tt_get_positive_quad\(\s+.+?,\s+)b(\".*?)\\\\x00.*?,(\s+)b(\".*?)\\\\x00.*?," \ "\${1}\${2}\",\${3}\${4}\","
fastmod -m -d . --extensions rs \ "pdf_add_stream\(\s*([^\n]*?),\s+?b(\".*?)\\\\x00\".*?,\s+.*?\)" "pdf_add_stream_str(\${1}, \${2}\")"
This allows for exotic PDF with this header: 00000000: 2550 4446 2d31 2e34 204d 6172 7665 6c6c %PDF-1.4 Marvell 00000010: 2053 656d 6963 6f6e 6475 6374 6f72 0a31 Semiconductor.1
With checked (i32) adds, this panicked during format generation.
aadbe09
to
d1858b6
Compare
This closes #192