Test build for debugging bug #979681.

WRF_wfloat() now aborts if the buffer would have been truncated.
This commit is contained in:
Tim Waugh 2013-07-09 11:47:46 +01:00
parent b364eac6bc
commit 57b8712a83
2 changed files with 7 additions and 3 deletions

View File

@ -7,7 +7,7 @@ diff -up ghostscript-9.07/base/wrfont.c.wrf-snprintf ghostscript-9.07/base/wrfon
- gs_sprintf(buffer, "%f", a_float);
+ if (gs_snprintf(buffer, sizeof (buffer), "%f", a_float) >= sizeof (buffer))
+ buffer[sizeof (buffer) - 1] = '\0';
+ abort();
WRF_wstring(a_output, buffer);
}
@ -17,6 +17,6 @@ diff -up ghostscript-9.07/base/wrfont.c.wrf-snprintf ghostscript-9.07/base/wrfon
- gs_sprintf(buffer, "%ld", a_int);
+ if (gs_snprintf(buffer, sizeof (buffer), "%ld", a_int) >= sizeof (buffer))
+ buffer[sizeof (buffer) - 1] = '\0';
+ abort();
WRF_wstring(a_output, buffer);
}

View File

@ -5,7 +5,7 @@ Summary: A PostScript interpreter and renderer
Name: ghostscript
Version: %{gs_ver}
Release: 8%{?dist}
Release: 8.1%{?dist}
# Included CMap data is Redistributable, no modification permitted,
# see http://bugzilla.redhat.com/487510
@ -353,6 +353,10 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libgs.so
%changelog
* Tue Jul 9 2013 Tim Waugh <twaugh@redhat.com> 9.07-8.1
- Test build for debugging bug #979681. WRF_wfloat() now aborts if
the buffer would have been truncated.
* Mon Jul 1 2013 Tim Waugh <twaugh@redhat.com> 9.07-8
- Use correct colord device ID in gstoraster.