X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fdevices%2Frescale.c;h=649601f1defb202312211f3dae1dc047f92d9ea6;hb=e4687b3aa2aed49fb16ba9e9561344d808750297;hp=b7712d519388fa5e614826210169e3e4df3f0603;hpb=69adfcc1ac5671cefc121087b0cabbb99510cff0;p=swftools.git diff --git a/lib/devices/rescale.c b/lib/devices/rescale.c index b7712d5..649601f 100644 --- a/lib/devices/rescale.c +++ b/lib/devices/rescale.c @@ -54,7 +54,7 @@ static void dbg(char*format, ...) int l; va_list arglist; va_start(arglist, format); - vsprintf(buf, format, arglist); + vsnprintf(buf, sizeof(buf)-1, format, arglist); va_end(arglist); l = strlen(buf); while(l && buf[l-1]=='\n') { @@ -329,6 +329,6 @@ void gfxdevice_rescale_setdevice(gfxdevice_t*dev, gfxdevice_t*out) gfxdevice_t* gfxdevice_rescale_new(gfxdevice_t*out, int width, int height, double scale) { gfxdevice_t* d = (gfxdevice_t*)malloc(sizeof(gfxdevice_t)); - gfxdevice_recale_init(d, out, width, height, scale); + gfxdevice_rescale_init(d, out, width, height, scale); return d; }