This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [patch] For memory access error when calling _stp_sockaddr_str with addrlen set to 0
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: "Zhaolei" <zhaolei at cn dot fujitsu dot com>
- Cc: <systemtap at sourceware dot org>
- Date: Wed, 05 Sep 2007 14:16:36 -0400
- Subject: Re: [patch] For memory access error when calling _stp_sockaddr_str with addrlen set to 0
- References: <1188780895.5736.ezmlm@sourceware.org> <006d01c7edd9$55a2b080$85697c0a@guest004> <00d501c7ef97$931426a0$85697c0a@guest004>
"Zhaolei" <zhaolei@cn.fujitsu.com> writes:
> I found a memory access error in aux_syscall.stp's _stp_sockaddr_str
> function.
Thanks.
> [...] Also, I think the buf's length should be considered when
> using it. If no objection, I will commit the following patch:
Looks good, except that I suggest using sizeof()-based expressions
instead of literal numbers for the length comparisons, if possible.
- FChE