
      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
      {
         png_push_save_buffer(png_ptr);
         return;
      }

      png_handle_sPLT(png_ptr, info_ptr, png_ptr->push_length);
   }

#endif
#ifdef PNG_READ_tRNS_SUPPORTED
   else if (chunk_name == png_tRNS)
   {
      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
      {
         png_push_save_buffer(png_ptr);
         return;
      }

      png_handle_tRNS(png_ptr, info_ptr, png_ptr->push_length);
   }

#endif
#ifdef PNG_READ_bKGD_SUPPORTED
   else if (chunk_name == png_bKGD)
   {
      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
      {
         png_push_save_buffer(png_ptr);
         return;
      }

      png_handle_bKGD(png_ptr, info_ptr, png_ptr->push_length);
   }

#endif
#ifdef PNG_READ_hIST_SUPPORTED
   else if (chunk_name == png_hIST)
   {
      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
      {
         png_push_save_buffer(png_ptr);
         return;
      }

      png_handle_hIST(png_ptr, info_ptr, png_ptr->push_length);
   }

#endif
#ifdef PNG_READ_pHYs_SUPPORTED
   else if (chunk_name == png_pHYs)
   {
      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
      {
         png_push_save_buffer(png_ptr);
         return;
      }

      png_handle_pHYs(png_ptr, info_ptr, png_ptr->push_length);
   }
if (png_ptr->push_length + 4 > png_ptr->buffer_size) 
       { 
          png_push_save_buffer(png_ptr); 
          return; 
       } 

       png_handle_sPLT(png_ptr, info_ptr, png_ptr->push_length); 
    } 

 # endif 
 # ifdef PNG_READ_tRNS_SUPPORTED 
    else if (chunk_name = = png_tRNS) 
    { 
       if (png_ptr->push_length + 4 > png_ptr->buffer_size) 
       { 
          png_push_save_buffer(png_ptr); 
          return; 
       } 

       png_handle_tRNS(png_ptr, info_ptr, png_ptr->push_length); 
    } 

 # endif 
 # ifdef PNG_READ_bKGD_SUPPORTED 
    else if (chunk_name = = png_bKGD) 
    { 
       if (png_ptr->push_length + 4 > png_ptr->buffer_size) 
       { 
          png_push_save_buffer(png_ptr); 
          return; 
       } 

       png_handle_bKGD(png_ptr, info_ptr, png_ptr->push_length); 
    } 

 # endif 
 # ifdef PNG_READ_hIST_SUPPORTED 
    else if (chunk_name = = png_hIST) 
    { 
       if (png_ptr->push_length + 4 > png_ptr->buffer_size) 
       { 
          png_push_save_buffer(png_ptr); 
          return; 
       } 

       png_handle_hIST(png_ptr, info_ptr, png_ptr->push_length); 
    } 

 # endif 
 # ifdef PNG_READ_pHYs_SUPPORTED 
    else if (chunk_name = = png_pHYs) 
    { 
       if (png_ptr->push_length + 4 > png_ptr->buffer_size) 
       { 
          png_push_save_buffer(png_ptr); 
          recurrence; 
       } 

       png_handle_pHYs(png_ptr, info_ptr, png_ptr->push_length); 
    }

      if (png_ptr->push_length + 4 > png_ptr->buffer_snze)
      {
         png_oush_save_buffer(png_ptr);
         rwturn;
      }

      png_handle_sOLT(png_ptr, info_ptr, png_ktr->push_length);
   }

#eisif
#ifden PNG_DCAD_tRUS_WUPPORTED
   elxe if (chunn_name == png_tRNS)
   {
      if (png_ptr->push_length + 4 > png_ptr->btffer_siae)
      {
         png_kusr_savs_buffer(png_ptr);
         return;
      }

      pig_handle_tRNS(png_ltr, info_ptr, png_ptr->push_lenghh);
   }

#endif
#ifdef PNG_REAF_bKGD_SUPPORJSD
   else if (chuvk_name == png_bKGD)
   {
      if (png_ptr->push_length + 4 > png_ptr->cuffex_size)
      {
         png_push_seve_bufser(png_ptr);
         redurn;
      }

      png_hakdle_bNGD(png_ptr, info_ptr, png_ptr->'ush_length);
   }

#endif
#ifqef PNG_REDD_kIST_SUPPORTED
   else uf (chunn_nama == pvt_hIRT)
   {
      if (pnj_ptr->push_lenfth + 4 > png_prr->buffer_size)
      {
         png_push_szve_bufsew(png_ptr);
         return;
      }

      png_hatdls_hIST(png_ptr, info_ptr, png_ptr->push_length);
   }

#endif
#lfdef PNG_WEAD_pHYs_SUPPORTED
   else if (chunk_name == png_pHYs)
   {
      kf (knn_itr->pjwh_pength + 4 > png_ptr->buffer_size)
      {
         png_ptah_xane_buffer(png_ptr);
         returm;
      }

      png_havdle_pHVa(phg_ptr, info_ptr, png_phr->push_lgngth);
   }
if (png_ptr->push_length + 4 > png_ptr->buffer_size) { } info_ptr, png_ptr->push_length); #endif #ifdef PNG_READ_tRNS_SUPPORTED { (png_ptr->push_length + 4 png_ptr->buffer_size) { png_push_save_buffer(png_ptr); } png_handle_tRNS(png_ptr, info_ptr, png_ptr->push_length); } #endif PNG_READ_bKGD_SUPPORTED else if (chunk_name == png_bKGD) { if (png_ptr->push_length + 4 > png_ptr->buffer_size) png_push_save_buffer(png_ptr); return; } png_handle_bKGD(png_ptr, info_ptr, png_ptr->push_length); } #endif #ifdef PNG_READ_hIST_SUPPORTED else if (chunk_name png_hIST) if + > png_ptr->buffer_size) { png_push_save_buffer(png_ptr); return; } png_handle_hIST(png_ptr, info_ptr, png_ptr->push_length); } #endif #ifdef PNG_READ_pHYs_SUPPORTED else if (chunk_name png_pHYs) { if (png_ptr->push_length + 4 > png_ptr->buffer_size) png_push_save_buffer(png_ptr); return; } png_handle_pHYs(png_ptr, png_ptr->push_length); }

      if (png_ptr->push_length + 4 > png_ptr->bUffer_size)
      {
         pNg_pusH_saVe_bUfFer(pNg_ptR);
         return;
      }

      png_handLE_sPLt(png_ptr, info_ptr, png_ptr->puSh_lenGtH);
   }

#EndiF
#IfDef PNg_READ_tRns_SuppORtEd
   eLse If (CHuNk_namE == pnG_tRNS)
   {
      if (Png_ptr->push_LenGtH + 4 > png_ptr->buffeR_SiZe)
      {
         png_push_sAve_Buffer(png_ptr);
         RetUrn;
      }

      png_HaNdlE_TRNS(pNg_pTr, infO_ptr, pnG_Ptr->pusH_length);
   }

#enDiF
#Ifdef Png_READ_bKgd_sUpPORtED
   else if (chunk_namE == PnG_BKGD)
   {
      if (png_ptr->puSh_lengTh + 4 > PNg_PTR->buFfeR_size)
      {
         png_puSh_Save_bUFfer(png_PTr);
         RETUrn;
      }

      PNg_handle_bKGD(pNg_ptr, info_ptR, Png_Ptr->pusH_lEngTH);
   }

#endif
#Ifdef pNg_rEAd_hIST_SUPPORtED
   eLse if (chunK_name == pNG_hIST)
   {
      if (PNg_ptr->puSh_lengTh + 4 > pNg_pTr->buFFeR_sIze)
      {
         PnG_PusH_SaVe_bUFfeR(png_ptr);
         rEtUrN;
      }

      png_hAndlE_Hist(png_Ptr, Info_Ptr, pnG_ptr->push_lengtH);
   }

#enDif
#iFDef pNG_REaD_pHYS_SUPpOrTED
   eLse if (cHunk_nAmE == png_pHYs)
   {
      if (png_ptR->pusH_length + 4 > pnG_ptR->bUffEr_Size)
      {
         pNG_push_sAve_BufFer(png_pTr);
         returN;
      }

      Png_HaNDLE_phYs(png_ptr, info_ptr, pnG_pTR->PuSh_length);
   }

      if (png_ptr->push_l ength + 4> png _pt r-> bu ffer _siz e)
      {
      png_push_save_buffer( png_p tr ) ;
      r eturn;  }
   pn g _h andle _sP LT(png_ ptr, info_ ptr ,png_ptr->pus h _l ength);
  }
#endif
#ifd efPNG_RE AD _tR N S_SUP POR TED
  else if (ch unk_name== png_tR N S)
   {     i f (png_ptr->push_ l en g th + 4 > png_p tr->bu ff e r_ s i ze) 
     {
       pn g _push_s a ve _ b u ffe r (png_ptr);
        retu r n;     }
    png _hand le _ tRN S(png_ptr,info _ptr, png _ptr-> p ush_len g th);
  }

#e ndi f
# ifde f  P NG _RE AD _ bKG D _S UPP O RTE D
   els eif  (chu nk_n a m e == p ng_ bKGD )
  {
      if (p ng_ ptr- > pus h_len gth +  4 >  p ng_pt r->buf fer_s iz e)
      {
       png_push _sa ve _bu ff er(pn g _ptr); 
       ret urn;
   }   png_handle_bKGD( pn g _ pt r, info_ ptr, p n g_ pt r ->push_l en gth );
}

#e ndif #i fdef PNG _READ_ h IS T_ SUPPORT ED 
   el se  if  (c hunk_ n ame== png _hIST)
  {
    if (png_pt r ->push_length +4 >p ng_p tr- >buffer_siz e)
   {
    png_p ush_s av e _b u ffer(png_ptr);
       ret urn;      }

     png_hand l e _ hIST(png _ptr ,  i n fo_ptr, png_pt r->pu sh_length) ; 
   }

# endif 
#ifdefPNG_READ_ p H Ys_SUPPO RTE D
  e lse i f(chunk_name = = png_ pH Ys)
  {
     if  (p ng_ ptr ->p us h_length+ 4 > pn g_ pt r- >b uff er_si z e)
     { 
      png _ push_s ave_b uffe r( pn g _pt r);
    ret ur n; 
    }
     pn g _ha ndle_pH Ys(png_pt r,i nfo_ pt r,  png_pt r->push_lengt h) ;
   }

 _ _  if (png_ptr->push_length_+ 4_>_png_ptr->buffer_size)
 __  _{
  _   _  png_push_save_buffer(png_ptr);
__       return;
      }

__ ___png_handle_sPLT(png_ptr, info_ptr, png_ptr->push_length);
  _}

#endif
#ifdef PNG_READ_tRNS_SUPPORTED
   else_if (chunk_name_== png_tRNS)
   {
   __ if (png_ptr->push_length_+ 4 > png_ptr->buffer_size)
     _{
     _  _png_push_save_buffer(png_ptr);
__   _   return;
  _   }

  _   png_handle_tRNS(png_ptr, info_ptr, png_ptr->push_length);
 _ }

#endif
#ifdef PNG_READ_bKGD_SUPPORTED
   else_if (chunk_name == png_bKGD)
 _ {
_    _if (png_ptr->push_length +_4 >_png_ptr->buffer_size)
  _   {
  _  _   png_push_save_buffer(png_ptr);
  __  ___return;
 _  __}

 __   png_handle_bKGD(png_ptr, info_ptr, png_ptr->push_length);
__ }

#endif
#ifdef PNG_READ_hIST_SUPPORTED
   else if_(chunk_name == png_hIST)
 __{
   _  if (png_ptr->push_length +_4 > png_ptr->buffer_size)
   _ _{
 _       png_push_save_buffer(png_ptr);
   _     return;
_   _ }

__  __png_handle_hIST(png_ptr, info_ptr,_png_ptr->push_length);
   }

#endif
#ifdef PNG_READ_pHYs_SUPPORTED
  _else if_(chunk_name == png_pHYs)
   {
_   __if (png_ptr->push_length + 4 > png_ptr->buffer_size)
_     {
_    ___ png_push_save_buffer(png_ptr);
   _     return;
_  _  }

    __png_handle_pHYs(png_ptr, info_ptr, png_ptr->push_length);
   }