On Tue, Sep 5, 2017 at 4:04 PM, Wei Liu <wei.l...@citrix.com> wrote: > On Tue, Sep 05, 2017 at 01:58:53PM +0100, Ian Jackson wrote: >> Wei Liu writes ("Re: [PATCH v4 03/13] libxl: add vdispl device"): >> > > + rc = snprintf(connector_path, 128, "%s/%d", path, >> > > info->num_connectors); >> >> Why not use GCSPRINTF ? These statically sized buffers etc. are an >> invitation to bugs. > > Right, that's a better suggestion.
I reuse connector_path buffer as path to read connector settings from xen store. So if I use GCSPRINTF for each setting then this function will allocate about 256 bytes for one connector. In typical scenario each frontend will have 1 or 2 connectors. If it is ok I will use GCSPRINTF. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel