]> granicus.if.org Git - libjpeg-turbo/commitdiff
Correct memory allocation failure messages
authorDRC <dcommander@users.sourceforge.net>
Fri, 25 Feb 2011 01:31:13 +0000 (01:31 +0000)
committerDRC <dcommander@users.sourceforge.net>
Fri, 25 Feb 2011 01:31:13 +0000 (01:31 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@447 632fc199-4ca6-4c93-a231-07263d6284db

turbojpegl.c

index 464cf04300b2f42fba455632ca20ff859ee3b604..94af6d73479242b94ed52d17d88208e004d372e5 100644 (file)
@@ -517,7 +517,7 @@ DLLEXPORT int DLLCALL tjDecompress(tjhandle h,
                        th[i]=compptr->v_samp_factor*DCTSIZE;
                        tmpbufsize+=iw[i]*th[i];
                        if((outbuf[i]=(JSAMPROW *)malloc(sizeof(JSAMPROW)*ch[i]))==NULL)
-                               _throw("Memory allocation failed in tjInitDecompress()");
+                               _throw("Memory allocation failed in tjDecompress()");
                        for(row=0; row<ch[i]; row++)
                        {
                                outbuf[i][row]=ptr;
@@ -527,13 +527,13 @@ DLLEXPORT int DLLCALL tjDecompress(tjhandle h,
                if(usetmpbuf)
                {
                        if((_tmpbuf=(JSAMPLE *)malloc(sizeof(JSAMPLE)*tmpbufsize))==NULL)
-                               _throw("Memory allocation failed in tjInitDecompress()");
+                               _throw("Memory allocation failed in tjDecompress()");
                        ptr=_tmpbuf;
                        for(i=0; i<dinfo->num_components; i++)
                        {
                                jpeg_component_info *compptr=&dinfo->comp_info[i];
                                if((tmpbuf[i]=(JSAMPROW *)malloc(sizeof(JSAMPROW)*th[i]))==NULL)
-                                       _throw("Memory allocation failed in tjInitDecompress()");
+                                       _throw("Memory allocation failed in tjDecompress()");
                                for(row=0; row<th[i]; row++)
                                {
                                        tmpbuf[i][row]=ptr;
@@ -545,7 +545,7 @@ DLLEXPORT int DLLCALL tjDecompress(tjhandle h,
        else
        {
                if((row_pointer=(JSAMPROW *)malloc(sizeof(JSAMPROW)*height))==NULL)
-                       _throw("Memory allocation failed in tjInitDecompress()");
+                       _throw("Memory allocation failed in tjDecompress()");
                for(i=0; i<height; i++)
                {
                        if(flags&TJ_BOTTOMUP) row_pointer[i]= &dstbuf[(height-i-1)*pitch];