[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.
This commit is contained in:
parent
bd6fcb16e5
commit
524c69665f
@ -422,7 +422,7 @@ hex_dump_to_buffer(const void *buf, size_t len, int rowsize, int groupsize,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (j > linebuflen - 1)
|
if (j > linebuflen - 4)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
sprintf(linebuf + j, "%02X", c);
|
sprintf(linebuf + j, "%02X", c);
|
||||||
|
Loading…
Reference in New Issue
Block a user