Changeset eea72a13 for perlconfig.c


Ignore:
Timestamp:
Sep 12, 2009, 7:37:37 PM (15 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
5118b32
Parents:
2340422
Message:
owl_new_sv: Escape non-utf8 strings before erroring with them.

Sending known non-utf8 text back into other code is just a bad
plan. In particular, multiline error messages become admin messages,
which results in their bodies getting sent to perl, which calls
owl_new_sv, and we would recurse infinitely.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlconfig.c

    rd1b1cf6 reea72a13  
    2929    SvUTF8_on(ret);
    3030  } else {
    31     owl_function_error("Internal error! Non-UTF-8 string encountered:\n%s", str);
     31    char *escape = owl_escape_highbit(str);
     32    owl_function_error("Internal error! Non-UTF-8 string encountered:\n%s", escape);
     33    owl_free(escape);
    3234  }
    3335  return ret;
Note: See TracChangeset for help on using the changeset viewer.