File bnc#769565-gimp-NULL-ptr-crash-in-fit-format-handler.patch of Package gimp.817

Index: gimp-2.6.11/plug-ins/file-fits/fits-io.c
===================================================================
--- gimp-2.6.11.orig/plug-ins/file-fits/fits-io.c
+++ gimp-2.6.11/plug-ins/file-fits/fits-io.c
@@ -1057,7 +1057,16 @@ static FITS_HDU_LIST *fits_decode_header
  if (hdulist->used.xtension)
  {
    fdat = fits_decode_card (fits_search_card (hdr, "XTENSION"), typ_fstring);
-   strcpy (hdulist->xtension, fdat->fstring);
+   
+   if(fdat != NULL) 
+   {
+    strcpy (hdulist->xtension, fdat->fstring);
+   } 
+   else 
+   {
+     strcpy (errmsg, "No valid XTENSION header found.");
+     goto err_return;
+   }
  }
 
  FITS_DECODE_CARD (hdr, "NAXIS", fdat, typ_flong);
openSUSE Build Service is sponsored by