<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Mathias,<br>
<br>
thanks for the good help and no problem with the Signed-off-by
line. If you don't object we will just add a "Signed-off-by:
Mathias Tillman <a class="moz-txt-link-rfc2396E" href="mailto:master.homer@gmail.com"><master.homer@gmail.com></a>" line when we push
this patch to the repository.<br>
<br>
It's just for tracking who created which code and who might know
why something is implemented as it is, but since it's rather
obvious what's wrong here there probably won't be any more
questions about his.<br>
<br>
I honestly don't remember if I have commit access to libdrm
myself, but going to check. If not Alex or somebody else need to
commit this.<br>
<br>
Regards,<br>
Christian.<br>
<br>
On 24.08.2015 10:03, Mathias Tillman wrote:<br>
</div>
<blockquote
cite="mid:CAKRBrgH+cT4WhQtu76nuvsj+spoXKAscm25ddvtCGA4G26DEJA@mail.gmail.com"
type="cite">
<div dir="ltr">Sorry, no I am not a developer working on libdrm,
this is my first contribution to it in fact. How would I go
about adding my Signed-Off?</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Mon, 24 Aug 2015 at 09:59 Zhou, Jammy <<a
moz-do-not-send="true" href="mailto:Jammy.Zhou@amd.com">Jammy.Zhou@amd.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">> Would
be more convenient if Mathias would add his Signed-off-by as
well and send out the patch, cause he is the original author.<br>
<br>
Agreed. Just was not quite sure if Mathias is working on the
libdrm project directly or not based on the comments in the
bugzilla "hopefully the fix can be pushed to master soon".<br>
<br>
Regards,<br>
Jammy<br>
<br>
-----Original Message-----<br>
From: Christian König [mailto:<a moz-do-not-send="true"
href="mailto:deathsimple@vodafone.de" target="_blank">deathsimple@vodafone.de</a>]<br>
Sent: Monday, August 24, 2015 3:52 PM<br>
To: Zhou, Jammy; <a moz-do-not-send="true"
href="mailto:dri-devel@lists.freedesktop.org"
target="_blank">dri-devel@lists.freedesktop.org</a>; <a
moz-do-not-send="true" href="mailto:master.homer@gmail.com"
target="_blank">master.homer@gmail.com</a><br>
Subject: Re: [PATCH] drm: fix the usage after free<br>
<br>
On 24.08.2015 05:56, Jammy Zhou wrote:<br>
> From: Mathias Tillman <<a moz-do-not-send="true"
href="mailto:master.homer@gmail.com" target="_blank">master.homer@gmail.com</a>><br>
><br>
> For readdir_r(), the next directory entry is returned in<br>
> caller-allocted buffer (pointered by pent here).<br>
><br>
> <a moz-do-not-send="true"
href="https://bugs.freedesktop.org/show_bug.cgi?id=91704"
rel="noreferrer" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=91704</a><br>
><br>
> Signed-off-by: Jammy Zhou <<a moz-do-not-send="true"
href="mailto:Jammy.Zhou@amd.com" target="_blank">Jammy.Zhou@amd.com</a>><br>
<br>
Would be more convenient if Mathias would add his
Signed-off-by as well and send out the patch, cause he is the
original author.<br>
<br>
Anyway the patch is clearly a nice catch and Reviewed-by:
Christian König <<a moz-do-not-send="true"
href="mailto:christian.koenig@amd.com" target="_blank">christian.koenig@amd.com</a>><br>
<br>
Regards,<br>
Christian.<br>
<br>
> ---<br>
> xf86drm.c | 5 +++--<br>
> 1 file changed, 3 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/xf86drm.c b/xf86drm.c<br>
> index 5e02969..a7cc643 100644<br>
> --- a/xf86drm.c<br>
> +++ b/xf86drm.c<br>
> @@ -2803,11 +2803,12 @@ static char
*drmGetMinorNameForFD(int fd, int<br>
> type)<br>
><br>
> while (readdir_r(sysdir, pent, &ent) == 0
&& ent != NULL) {<br>
> if (strncmp(ent->d_name, name, len) ==
0) {<br>
> + snprintf(dev_name,
sizeof(dev_name), DRM_DIR_NAME "/%s",<br>
> + ent->d_name);<br>
> +<br>
> free(pent);<br>
> closedir(sysdir);<br>
><br>
> - snprintf(dev_name,
sizeof(dev_name), DRM_DIR_NAME "/%s",<br>
> - ent->d_name);<br>
> return strdup(dev_name);<br>
> }<br>
> }<br>
<br>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>