diff options
-rw-r--r-- | winsup/utils/strace.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc index 5d4a23d0f..eb96a61b6 100644 --- a/winsup/utils/strace.cc +++ b/winsup/utils/strace.cc @@ -472,6 +472,12 @@ handle_output_debug_string (DWORD id, LPVOID p, unsigned mask, FILE *ofile) len = 17; } + /* Note that the following code deliberately points buf 20 bytes into the + allocated area. The subsequent code then overwrites the usecs value + given in the application's debug string, which potentially prepends + characters to the string. If that sounds confusing and dangerous, well... + + TODO: This needs a cleanup. */ char *buf; buf = (char *) alloca (len + 85) + 20; |