Date: Fri, 3 Jun 2016 05:01:35 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301236 - head/sys/dev/drm2 Message-ID: <201606030501.u5351ZMg035703@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Fri Jun 3 05:01:35 2016 New Revision: 301236 URL: https://svnweb.freebsd.org/changeset/base/301236 Log: [drm] fix up hex_dump_to_buffer to not overflow linebuf. That check wasn't enough to handle appending a two byte character following it. This prevented my T400 (Intel Core 2 Duo P8400) from attaching; it would panic from a stack overflow detection. Modified: head/sys/dev/drm2/drm_os_freebsd.c Modified: head/sys/dev/drm2/drm_os_freebsd.c ============================================================================== --- head/sys/dev/drm2/drm_os_freebsd.c Fri Jun 3 03:40:39 2016 (r301235) +++ head/sys/dev/drm2/drm_os_freebsd.c Fri Jun 3 05:01:35 2016 (r301236) @@ -422,7 +422,7 @@ hex_dump_to_buffer(const void *buf, size } } - if (j > linebuflen - 1) + if (j > linebuflen - 4) break; sprintf(linebuf + j, "%02X", c);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606030501.u5351ZMg035703>