gmic/gmic-overflow.diff
Marcus Meissner 662b013d9c Accepting request 315257 from home:garloff:branches:graphics
- Fix build of gmic with older 2.6 GIMP (SLE11).

- Update to gmic-1.6.5.0: 
  * https://www.flickr.com/groups/gmic/discuss/72157653514140862/
  * New commands: -label3d, -head, -files
  * Improvements -repeat, -axes, -warn, -displacement, -files2video, 
    -apply_files
  * Math parser now supports sqr()
  * Bugfixes: Iain Fergusson denoising with selections and new layers,
    video stream, -display garbage, -graph, -display_graph, -plot with
    plot_type=3, 3d rendering, -camera with specified resolution.
- Update to gmic-1.6.3.1:
  * https://www.flickr.com/groups/gmic/discuss/72157652079823575/
  * New commands: -pack, -x_landscape
  * Improvements for 3d object rendering with z-buffer
  * Shared gmicrc resource directory
  * Math parser supporrts isfile(path), isdir(path) and fdate() now.
  * libgmic now uses libpng, libtiff, libjpeg, libcurl, libfftw.
  * Added some tooltips (gimp plugin)
  * Bugfixes: Possible buffer overflows in plugins

- Update to gmic-1.6.2.0:
  * https://www.flickr.com/groups/gmic/discuss/72157651409869115/
  * New commands -apply_timeout, -boxfilter, -serialize, -unserialize,
    -fps, -transition.
  * New filters Sequences / Spatial transition, Colors / Transfer colors 
    [advanced] 
  * Improved error message line numbers in -if .. -endif block.
  * Improved -blur, -displacement, - input, -warp
  * Compressed storage of custom commands

OBS-URL: https://build.opensuse.org/request/show/315257
OBS-URL: https://build.opensuse.org/package/show/graphics/gmic?expand=0&rev=5
2015-07-07 15:18:59 +00:00

27 lines
1.5 KiB
Diff

Index: gmic-1.6.5.0/src/CImg.h
===================================================================
--- gmic-1.6.5.0.orig/src/CImg.h
+++ gmic-1.6.5.0/src/CImg.h
@@ -49065,9 +49065,9 @@ namespace cimg_library_suffixed {
filename?filename:"(FILE*)");
#endif
std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
const char *const ptype = pixel_type(), *const etype = cimg::endianness()?"big":"little";
- if (std::strstr(ptype,"unsigned")==ptype) std::fprintf(nfile,"%u unsigned_%s %s_endian\n",_width,ptype + 9,etype);
+ if (std::strlen(ptype) > 9 && std::strstr(ptype,"unsigned")==ptype) std::fprintf(nfile,"%u unsigned_%s %s_endian\n",_width,ptype + 9,etype);
else std::fprintf(nfile,"%u %s %s_endian\n",_width,ptype,etype);
cimglist_for(*this,l) {
const CImg<T>& img = _data[l];
std::fprintf(nfile,"%u %u %u %u",img._width,img._height,img._depth,img._spectrum);
@@ -49615,9 +49615,9 @@ namespace cimg_library_suffixed {
#endif
CImgList<ucharT> stream;
CImg<charT> tmpstr(128);
const char *const ptype = pixel_type(), *const etype = cimg::endianness()?"big":"little";
- if (std::strstr(ptype,"unsigned")==ptype)
+ if (std::strlen(ptype) > 9 && std::strstr(ptype,"unsigned")==ptype)
cimg_snprintf(tmpstr,tmpstr._width,"%u unsigned_%s %s_endian\n",_width,ptype + 9,etype);
else
cimg_snprintf(tmpstr,tmpstr._width,"%u %s %s_endian\n",_width,ptype,etype);
CImg<ucharT>::string(tmpstr,false).move_to(stream);