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

String handling fixes and simplifications #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 23, 2017

  1. String handling fixes and simplifications

    * Refactor most of string handling code to use rb_str_* functions. This fixes numerous instances of unsafe string handling using strcpy/sprintf that could lead to buffer overflows and simplifies code in other places.
    * Don't copy ruby strings to stack buffers when not needed, just use STR2CSTR (requires RB_GC_GUARD). This fixes possible stack buffer overflows.
    * Change definition of STR2CSTR to StringValueCStr, as StringValuePtr does not even guarantee returning a null-terminated string.
    Jakub Zakrzewski committed Sep 23, 2017
    Configuration menu
    Copy the full SHA
    5e1851e View commit details
    Browse the repository at this point in the history