Module Name: xsrc Committed By: christos Date: Tue Jun 4 00:19:24 UTC 2013
Modified Files: xsrc/external/mit/xf86-video-openchrome/dist/src: via_lvds.c Log Message: fix another useless (and incorrect) variable stack size allocation To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ xsrc/external/mit/xf86-video-openchrome/dist/src/via_lvds.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: xsrc/external/mit/xf86-video-openchrome/dist/src/via_lvds.c diff -u xsrc/external/mit/xf86-video-openchrome/dist/src/via_lvds.c:1.1.1.2 xsrc/external/mit/xf86-video-openchrome/dist/src/via_lvds.c:1.2 --- xsrc/external/mit/xf86-video-openchrome/dist/src/via_lvds.c:1.1.1.2 Sat Jun 1 17:08:53 2013 +++ xsrc/external/mit/xf86-video-openchrome/dist/src/via_lvds.c Mon Jun 3 20:19:24 2013 @@ -1470,7 +1470,7 @@ static const xf86OutputFuncsRec via_lvds static void ViaPanelGetNativeModeFromOption(ScrnInfoPtr pScrn, ViaPanelInfoPtr panel, char *name) { - char aux[strlen(name) + 1]; + char aux[256]; CARD8 length, index; DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, @@ -1480,8 +1480,8 @@ ViaPanelGetNativeModeFromOption(ScrnInfo length = sizeof(ViaPanelNativeModes) / sizeof(ViaPanelModeRec); for (index = 0; index < length; index++) { - sprintf(aux, "%dx%d", ViaPanelNativeModes[index].Width, - ViaPanelNativeModes[index].Height); + snprintf(aux, sizeof(aux), "%dx%d", ViaPanelNativeModes[index].Width, + ViaPanelNativeModes[index].Height); if (!xf86NameCmp(name, aux)) { panel->NativeModeIndex = index; panel->NativeWidth = ViaPanelNativeModes[index].Width;