strace: Add comment trying to explain confusing code
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
46c472a1c1
commit
61401f24ef
@ -472,6 +472,12 @@ handle_output_debug_string (DWORD id, LPVOID p, unsigned mask, FILE *ofile)
|
|||||||
len = 17;
|
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;
|
char *buf;
|
||||||
buf = (char *) alloca (len + 85) + 20;
|
buf = (char *) alloca (len + 85) + 20;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user