From: Dave Airlie <[email protected]>

Al Viro pointed out that Debian started segfaulting in Xine for him,

Reported-by: Al Viro
Signed-off-by: Dave Airlie <[email protected]>
---
 src/XvMC.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/XvMC.c b/src/XvMC.c
index cb42487..74c8b85 100644
--- a/src/XvMC.c
+++ b/src/XvMC.c
@@ -585,15 +585,15 @@ Status XvMCGetDRInfo(Display *dpy, XvPortID port,
        if (*name && *busID && tmpBuf) {
            _XRead(dpy, tmpBuf, realSize);
            strncpy(*name,tmpBuf,rep.nameLen);
-           name[rep.nameLen - 1] = '\0';
+           (*name)[rep.nameLen - 1] = '\0';
            strncpy(*busID,tmpBuf+rep.nameLen,rep.busIDLen);
-           busID[rep.busIDLen - 1] = '\0';
+           (*busID)[rep.busIDLen - 1] = '\0';
            XFree(tmpBuf);
        } else {
            XFree(*name);
            *name = NULL;
            XFree(*busID);
-           *name = NULL;
+           *busID = NULL;
            XFree(tmpBuf);
 
            _XEatDataWords(dpy, rep.length);
-- 
1.8.1.2

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to