Skip to content

Commit

Permalink
Resolved Encoding Issue
Browse files Browse the repository at this point in the history
  • Loading branch information
leeN authored and tmbrbr committed Jan 29, 2025
1 parent 8b47a92 commit 2828e4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/src/builtin/String.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ js::str_tainted(JSContext* cx, unsigned argc, Value* vp)
if(args.length() >= 2 && args.hasDefined(1)) {
RootedString src_str(cx, ArgToLinearString(cx, args, 1));
if (src_str && src_str->length() > 0) {
UniqueChars src = JS_EncodeStringToUTF8(cx, src_str);
UniqueChars src = JS_EncodeStringToLatin1(cx, src_str);
source = std::string(src.get());
}
}
Expand Down Expand Up @@ -5350,7 +5350,7 @@ static bool foxhound_sink(JSContext* cx, unsigned argc, Value* vp) {
if (!sink) {
return false;
}
UniqueChars sinkchars = JS_EncodeStringToUTF8(cx, sink);
UniqueChars sinkchars = JS_EncodeStringToLatin1(cx, sink);
JS_ReportTaintSink(cx, str, sinkchars.get());

args.rval().setUndefined();
Expand Down

0 comments on commit 2828e4a

Please sign in to comment.