]> granicus.if.org Git - libjpeg-turbo/commitdiff
Our copyright string is longer than JMSG_LENGTH_MAX, and this was causing a buffer...
authorDRC <dcommander@users.sourceforge.net>
Wed, 28 May 2014 20:19:54 +0000 (20:19 +0000)
committerDRC <dcommander@users.sourceforge.net>
Wed, 28 May 2014 20:19:54 +0000 (20:19 +0000)
We can't simply increase JMSG_LENGTH_MAX, because it is part of the libjpeg API, and it is generally assumed that a buffer of this length will be passed to format_message().  Thus, the easiest solution is simply to use a shorter copyright string for JMSG_COPYRIGHT.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1318 632fc199-4ca6-4c93-a231-07263d6284db

ChangeLog.txt
jerror.h
jversion.h

index c8476df6efb57cbd2c5d36805424b23b94c5aec4..8a70f6718618289f8927092bb6327de533f6de50 100644 (file)
@@ -70,6 +70,9 @@ handle prototypes and support for the MS-DOS memory model, were removed from
 the libjpeg code, greatly improving its readability and making it easier to
 maintain and extend.
 
+[10] Fixed a segfault that occurred when calling output_message() with msg_code
+set to JMSG_COPYRIGHT.
+
 
 1.3.1
 =====
index fab59b3800031b02cab10f0ded8cfe8ddf7a52c3..402613e002a9394f9682f5511869dde17e922fae 100644 (file)
--- a/jerror.h
+++ b/jerror.h
@@ -1,9 +1,11 @@
 /*
  * jerror.h
  *
+ * This file was part of the Independent JPEG Group's software:
  * Copyright (C) 1994-1997, Thomas G. Lane.
  * Modified 1997-2009 by Guido Vollbeding.
- * This file is part of the Independent JPEG Group's software.
+ * libjpeg-turbo Modifications:
+ * Copyright (C) 2014, D. R. Commander.
  * For conditions of distribution and use, see the accompanying README file.
  *
  * This file defines the error and message codes for the JPEG library.
@@ -132,7 +134,7 @@ JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up")
 JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation")
 JMESSAGE(JERR_XMS_READ, "Read from XMS failed")
 JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed")
-JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT)
+JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT_SHORT)
 JMESSAGE(JMSG_VERSION, JVERSION)
 JMESSAGE(JTRC_16BIT_TABLES,
          "Caution: quantization tables are too coarse for baseline JPEG")
index 7ab288701b8438598e38159b10ce56514b5482a0..25c3cf0b0c1d2d3e3ae669fdd2257a9e54708fd4 100644 (file)
@@ -32,3 +32,5 @@
                         "Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies)\n" \
                         "Copyright (C) 2013-2014 MIPS Technologies, Inc.\n" \
                         "Copyright (C) 2013 Linaro Limited"
+
+#define JCOPYRIGHT_SHORT "Copyright (C) 1991-2014 The libjpeg-turbo Project and many others"