https://bugs.kde.org/show_bug.cgi?id=379039

--- Comment #2 from Peter (Stig) Edwards <thatsafunnyname.ra...@mailnull.com> 
---
(In reply to Ivo Raisr from comment #1)
> Yes, indeed. Kernel takes care to copy TASK_COMM_LEN at max.
> Please could you supply a patch with the fix?

Thank you for the quick response.

I did look to see if I could find a quick fix.  I was looking for a
*asciiz function in memcheck/mc_main.c that could take a length limit
so that I could pass TASK_COMM_LEN to it.  I did not find one.

I thought it might be possible in
coregrind/m_syswrap/syswrap-linux.c::PRE(sys_prctl) VKI_PR_SET_NAME case to
change PRE_MEM_RASCIIZ to a strnlen call with TASK_COMM_LEN and then call
PRE_MEM_READ with size.

I am not familiar with the valgrind codebase and I do not currently have time
to work on a patch for this.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to