Oops. Height of output buffer should equal scaled height, not JPEG height.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@754 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
DRC
2012-01-28 06:31:21 +00:00

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C)2009-2011 D. R. Commander. All Rights Reserved.
* Copyright (C)2009-2012 D. R. Commander. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -110,7 +110,7 @@ int decomptest(unsigned char *srcbuf, unsigned char **jpegbuf,
if((handle=tjInitDecompress())==NULL)
_throwtj("executing tjInitDecompress()");
bufsize=(yuv==YUVDECODE? yuvsize:pitch*h);
bufsize=(yuv==YUVDECODE? yuvsize:pitch*scaledh);
if(dstbuf==NULL)
{
if((dstbuf=(unsigned char *)malloc(bufsize)) == NULL)