This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug runtime/22991] Invalid truncation of quoted strings
- From: "georg.schoelly at joesecurity dot org" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Thu, 19 Apr 2018 08:16:32 +0000
- Subject: [Bug runtime/22991] Invalid truncation of quoted strings
- Auto-submitted: auto-generated
- References: <bug-22991-6586@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=22991
Georg <georg.schoelly at joesecurity dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |VERIFIED
--- Comment #4 from Georg <georg.schoelly at joesecurity dot org> ---
Thank you for fixing this! I found one more edge case.
Test case
=========
> probe oneshot {
> printf("%s\n", string_quoted("This is a \\test", 18));
> printf("%s\n", string_quoted("This is a \\test", 17));
> printf("%s\n", string_quoted("This is a \\test", 16));
> // \xc3\xb6 is utf-8 for latin small o with diareses
> printf("%s\n", string_quoted("This is a \xc3\xb6", 18));
> printf("%s\n", string_quoted("This is a \xc3\xb6", 17));
> printf("%s\n", string_quoted("This is a \xc3\xb6", 16));
> }
>
>
> /* same as string_quoted in tapset/string.stp with
> * an additional length parameter */
> function string_quoted:string (str:string, len:long) %{
> (void) _stp_text_str(STAP_RETVALUE,
> (char *)(uintptr_t)STAP_ARG_str,
> STAP_ARG_len, STAP_ARG_len, 1, 0, 0);
> %}
Expected Result
===============
> "This is a \\test"
> "This is a \\"...
> "This is a "...
> "This is a \u00F6"
> "This is a "...
> "This is a "...
Actual Result
=============
> "This is a \\test"
> "This is a \\"...
> "This is a "...
> "This is a \u00F6"
> "This is a \u"... <- broken char
> "This is a \"... <- broken char
--
You are receiving this mail because:
You are the assignee for the bug.