summaryrefslogtreecommitdiffstats
path: root/Modules/imageop.c
Commit message (Collapse)AuthorAgeFilesLines
* Merged revisions 67266 via svnmerge fromAmaury Forgeot d'Arc2008-11-181-1/+1
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r67266 | amaury.forgeotdarc | 2008-11-18 23:19:37 +0100 (mar., 18 nov. 2008) | 4 lines #4317: Fix an Array Bounds Read in imageop.rgb2rgb8. Will backport to 2.4. ........
* fix security issue 2: imageop's poor validation of arguments could result in ↵Benjamin Peterson2008-09-301-162/+110
| | | | | | | segfaults patch by Victor Stinner reviewed by myself and Brett
* Issue 1179: [CVE-2007-4965] Integer overflow in imageop module.Guido van Rossum2008-08-191-12/+68
|
* This reverts r63675 based on the discussion in this thread:Gregory P. Smith2008-06-091-31/+31
| | | | | | | http://mail.python.org/pipermail/python-dev/2008-June/079988.html Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names in the spirit of 3.0 are available via a #define only. See the email thread.
* Renamed PyString to PyBytesChristian Heimes2008-05-261-31/+31
|
* Depreate imageop for removal in 3.0.Brett Cannon2008-05-121-0/+5
|
* Check return result from Py_InitModule*(). This API can fail.Neal Norwitz2006-01-191-0/+2
| | | | Probably should be backported.
* The format of the string data used in the imageop module is describedSjoerd Mullender2004-01-101-33/+108
| | | | | | | | | | | | | | | | | | as "This is the same format as used by gl.lrectwrite() and the imgfile module." This implies a certain byte order in multi-byte pixel formats. However, the code was originally written on an SGI (big-endian) and *uses* the fact that bytes are stored in a particular order in ints. This means that the code uses and produces different byte order on little-endian systems. This fix adds a module-level flag "backward_compatible" (default not set, and if not set, behaves as if set to 1--i.e. backward compatible) that can be used on a little-endian system to use the same byte order as the SGI. Using this flag it is then possible to prepare SGI-compatible images on a little-endian system. This patch is the result of a (small) discussion on python-dev and was submitted to SourceForge as patch #874358.
* Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototypeMark Hammond2002-08-021-1/+1
| | | | | | for Py_Main(). Thanks to Kalle Svensson and Skip Montanaro for the patches.
* Convert more METH_OLDARGS & PyArg_Parse()Neal Norwitz2002-04-021-30/+30
| | | | Please review.
* Patch #477750: Use METH_ constants in Modules.Martin v. Löwis2002-01-171-15/+15
|
* REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum2000-09-011-9/+0
| | | | This should match the situation in the 1.6b1 tree.
* Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',Thomas Wouters2000-07-211-1/+1
| | | | | | | | | | | | | | | | | | and a couple of functions that were missed in the previous batches. Not terribly tested, but very carefully scrutinized, three times. All these were found by the little findkrc.py that I posted to python-dev, which means there might be more lurking. Cases such as this: long func(a, b) long a; long b; /* flagword */ { and other cases where the last ; in the argument list isn't followed by a newline and an opening curly bracket. Regexps to catch all are welcome, of course ;)
* ANSI-ficationPeter Schneider-Kamp2000-07-101-48/+16
|
* Change copyright notice - 2nd try.Guido van Rossum2000-06-301-6/+0
|
* Change copyright notice.Guido van Rossum2000-06-301-22/+7
|
* Add DL_EXPORT() to all modules that could possibly be usedGuido van Rossum1998-12-041-1/+1
| | | | on BeOS or Windows.
* Purported fixes for 64-bit platforms with help from John JorgensenGuido van Rossum1998-04-231-15/+27
|
* Apply two changes, systematically:Guido van Rossum1997-10-011-4/+3
| | | | | | | | | | | | | | | | | (1) Use PyErr_NewException("module.class", NULL, NULL) to create the exception object. (2) Remove all calls to Py_FatalError(); instead, return or ignore the errors -- the import code now checks PyErr_Occurred() after calling a module's init function, so it's no longer a fatal error for the initialization to fail. Also did some small cleanups, e.g. removed unnecessary test for "already initialized" from initfpectl(), and unified initposix()/initnt(). I haven't checked this very thoroughly, so while the changes are pretty trivial -- beware of untested code!
* Tweaks to keep the Microsoft compiler quier.Guido van Rossum1997-04-091-2/+2
|
* Renamed.Roger E. Masse1996-12-201-615/+625
|
* Keep gcc -Wall happy.Guido van Rossum1996-12-051-2/+2
|
* New permission notice, includes CNRI.Guido van Rossum1996-10-251-13/+20
|
* Added 16-bit pixel support for some operations.Jack Jansen1996-01-221-8/+15
|
* Added 1995 to copyright message.Guido van Rossum1995-01-041-2/+2
| | | | | Setup.in: clarified Tk comments somewhat. structmodule.c: use memcpy() instead of double precision assignment.
* Another bulky set of minor changes.Guido van Rossum1995-01-021-5/+2
| | | | | Note addition of gethostbyaddr() and improved repr() for sockets, renaming of md5.md5() to md5.new(), and fixing of leaks in threads.
* Added missing initializationJack Jansen1994-12-141-1/+1
|
* Merge alpha100 branch back to main trunkGuido van Rossum1994-08-011-8/+8
|
* * Extended X interface: pixmap objects, colormap objects visual objects,Sjoerd Mullender1993-10-111-0/+6
| | | | | | | | image objects, and lots of new methods. * Added counting of allocations and deallocations of builtin types if COUNT_ALLOCS is defined. Had to move calls to NEWREF down in some files. * Bug fix in sorting lists.
* Minor fixes / changes for Mac compatibility.Guido van Rossum1993-07-291-2/+2
|
* Added converters for rgb<->rgb8 and rgb<->greyJack Jansen1993-02-191-0/+156
|
* * Added Fixcprt.py: script to fix copyright message.Guido van Rossum1993-01-261-2/+2
| | | | | | | | | | | * various modules: added 1993 to copyright. * thread.c: added copyright notice. * ceval.c: minor change to error message for "+" * stdwinmodule.c: check for error from wfetchcolor * config.c: MS-DOS fixes (define PYTHONPATH, use DELIM, use osdefs.h) * Add declaration of inittab to import.h * sysmodule.c: added sys.builtin_module_names * xxmodule.c, xxobject.c: fix minor errors
* Added tovideo routineJack Jansen1993-01-221-0/+59
|
* Added 2 and 4 bits grey formatsJack Jansen1992-12-221-0/+208
|
* * mymalloc.h: always allocate one extra byte, since some malloc'sGuido van Rossum1992-12-141-1/+133
| | | | | | | | | | | | | return NULL for malloc(0) or realloc(p, 0). (This should be done differently than wasting one byte, but alas...) * Moved "add'l libraries" option in Makefile to an earlier place. * Remove argument compatibility hacks (b) and (c). * Add grey2mono, dither2mono and mono2grey to imageop. * Dup the fd in socket.fromfd(). * Added new modules mpz, md5 (by JH, requiring GNU MP 1.2). Affects Makefile and config.c. * socketmodule.c: added socket.fromfd(fd, family, type, [proto]), converted socket() to use of getargs().
* Added imageopmodule.c, also added them to Makefile and config.c.Guido van Rossum1992-10-261-0/+177
Fixed a bug in Addmodule.sh that caused a crash in Configure.py. Fixed the crash in Configure.py...