]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/mini-os.git/commit
minios: correct char array allocation for xenbus paths
authorMatt Wilson <msw@amazon.com>
Fri, 6 Sep 2013 19:52:04 +0000 (12:52 -0700)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 10 Sep 2013 09:54:34 +0000 (10:54 +0100)
commit0235a1aa4afffde489cc26f195a79351a7a2f37c
treed77ab4343ff5d2c66cb8b80ffd4b28592fc134c4
parentfaf85746de2f9dc58136beee5674636c9704cc22
minios: correct char array allocation for xenbus paths

The char arrays used to hold xenbus paths have historically been
allocated by manually counting the length longest string constants
included in constructing the path. This has led to improperly sized
buffers, both too large (with little consequence) and too small (which
obviously causes problems). This patch corrects the instances where
the length was incorrectly calculated by using strlen() on the longest
string constant used in building a xenbus path.

A follow-on clean-up patch will change all instances to use strlen().

Signed-off-by: Ben Cressey <bcressey@amazon.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-By: Samuel Thibault <samuel.thibault@ens-lyon.org>
[msw: split this patch from a larger patch from Ben, reworked to use
 strlen()]
Signed-off-by: Matt Wilson <msw@amazon.com>
blkfront.c
console/xenbus.c
fbfront.c
netfront.c
pcifront.c