X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=lib%2Fdma-debug.c;h=01e64270e246bef1070c9e68a3603051b02bf919;hb=424acaaeb3a3932d64a9b4bd59df6cf72c22d8f3;hp=ba8b67039d13eac2a81835a92d3241375fb43d3d;hpb=66b89159c25a47d2177743526c61b5ada7acc39e;p=~andy%2Flinux diff --git a/lib/dma-debug.c b/lib/dma-debug.c index ba8b67039d1..01e64270e24 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -570,7 +570,7 @@ static ssize_t filter_write(struct file *file, const char __user *userbuf, * Now parse out the first token and use it as the name for the * driver to filter for. */ - for (i = 0; i < NAME_MAX_LEN; ++i) { + for (i = 0; i < NAME_MAX_LEN - 1; ++i) { current_driver_name[i] = buf[i]; if (isspace(buf[i]) || buf[i] == ' ' || buf[i] == 0) break;