1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-28 07:21:26 +03:00
Commit Graph

37 Commits

Author SHA1 Message Date
Nick Wellnhofer
13acadbb1c Ignore function pointer cast warnings
Use GCC pragmas as these warnings are enabled by -Wpedantic and there's
no way to disable them selectively.
2017-11-14 16:01:48 +01:00
Vlad Tsyrklevich
28f52fe89d Refactor name and type signature for xmlNop
Update xmlNop's name to xmlInputReadCallbackNop and its type signature
to match xmlInputReadCallback.

Fixes bug 786134.
2017-11-09 13:43:08 +01:00
J. Peter Mugaas
8bc6c878e9 Fix macro redefinition warning 2017-10-21 13:57:44 +02:00
Nick Wellnhofer
2cdaaab11c Change preprocessor OS tests to __linux__
"linux" without leading underscores is deprecated and less reliable.
2017-09-14 21:30:51 +02:00
David Kilzer
502f6a6d08 More format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029

adds a new xmlEscapeFormatString() function to escape composed format
strings
2016-05-23 15:01:08 +08:00
David Kilzer
4472c3a5a5 Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029

Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports.
2016-05-23 15:01:07 +08:00
Daniel Veillard
5fe9e9ed1c Remove risk of lockup in dictionary initialization
Reported by Petr Sumbera <petr.sumbera@oracle.com>
Two threads entering xmlInitializeDict concurently could lead
to a lockup due to multiple initializations of the lock used.
To avoid this problem move this to a new private function
called from xmlOnceInit() and deprecate the old initalizer.
Since threaded programs must call xmlInitParser() and this
will lead to dereference of private data and the call to
xmlOnceInit() guaranteed to be unique this should be safe now.
2013-04-05 23:10:41 +08:00
Daniel Veillard
153cf15905 Fix large parse of file from memory
https://bugzilla.redhat.com/show_bug.cgi?id=862969
The new code trying to detect excessive input lookup would
just get wrong sometimes in the case of very large file parsed
directly from memory.
2012-10-26 13:50:47 +08:00
Roumen Petrov
1f0453f715 minimize use of HAVE_CONFIG_H
as build process for supported platforms provide "config.h" header file
2012-08-13 16:57:30 +08:00
Daniel Veillard
379ebc1d77 Cleanup on randomization
tsan reported that rand() is not thread safe, so create
a thread safe wrapper, use rand_r() if available.
Consolidate the function, initialization and cleanup in
dict.c and make sure it is initialized in xmlInitParser()
2012-05-18 15:41:31 +08:00
Rob Richards
a295fbc4cc Fix Win32 build
* libxml.h win32/Makefile.bcb win32/Makefile.mingw win32/Makefile.msvc: add
  NOLIBTOOL flag to prevent automatic define of LIBXML_STATIC
2010-03-19 06:31:55 -04:00
Roumen Petrov
120a269976 Fix build with mingw
- include/libxml/xmlexports.h: restore export decoration otherwise
  xsltproc and xmlsec crash
- libxml.h: define LIBXML_STATIC for static build
- configure.in: enable modules support for mingw* builds
- Makefile.am: flags for testdso if modules support enabled
2010-03-10 10:07:49 +01:00
Rob Richards
91eb560c7c __xmlGlobalInitMutexDestroy() will free global_init_lock on Win32. Patch
* globals.c threads.c include/libxml/threads.h: 
  __xmlGlobalInitMutexDestroy() will free global_init_lock on Win32.
  Patch from Marc-Antoine Ruel.

svn path=/trunk/; revision=3664
2007-11-16 10:54:59 +00:00
Daniel Veillard
509ed2aa1a new patch from Andreas Stricke to better integrate support for Windows CE
* include/win32config.h libxml.h: new patch from Andreas Stricke to
  better integrate support for Windows CE
Daniel

svn path=/trunk/; revision=3602
2007-04-18 07:51:50 +00:00
Daniel Veillard
59d3ed8fe0 applied patch from Andreas Stricke to ease the compilation on Windows CE
* catalog.c libxml.h win32/wince/wincecompat.h win32/wince/wincecompat.c
  xmlIO.c nanohttp.c nanoftp.c trio.c triostr.c triostr.h: applied 
  patch from Andreas Stricke to ease the compilation on Windows CE
Daniel

svn path=/trunk/; revision=3600
2007-04-17 12:44:58 +00:00
Daniel Veillard
fde5b0b9ca small cleanup to avoid packaging .svn applied patch to avoid a problem in
* Makefile.am: small cleanup to avoid packaging .svn
* libxml.h threads.c parser.c: applied patch to avoid a problem
  in concurrent threaded initialization fix from Ted Phelps
Daniel

svn path=/trunk/; revision=3582
2007-02-12 17:31:53 +00:00
Daniel Veillard
f79fbfc006 applied patch from Olli Savia for LynxOS Daniel
* libxml.h triodef.h: applied patch from Olli Savia for LynxOS
Daniel
2006-05-31 13:35:28 +00:00
Daniel Veillard
499cc9204f try to fix xmlParseInNodeContext when operating on an HTML document.
* HTMLparser.c libxml.h parser.c: try to fix xmlParseInNodeContext
  when operating on an HTML document.
Daniel
2006-01-18 17:22:35 +00:00
Daniel Veillard
c0c6ce2918 some gcc4 portability patches, including a serious aliasing bug exposed in
* include/libxml/hash.h libxml.h libxml.spec.in: some gcc4 portability
  patches, including a serious aliasing bug exposed in s390
  when trying to convert data pointer to code pointer.
Daniel
2005-03-10 09:22:07 +00:00
Daniel Veillard
be3eb2088e fixed a couple of problems in the new elfgcchack.h trick pointed by Peter
* libxml.h uri.c: fixed a couple of problems in the new
  elfgcchack.h trick pointed by Peter Breitenlohner
Daniel
2004-07-09 12:05:25 +00:00
Daniel Veillard
a2351322c8 hack based on Arjan van de Ven suggestion to reduce ELF footprint and
* elfgcchack.h doc/elfgcchack.xsl libxml.h: hack based on Arjan van de
  Ven suggestion to reduce ELF footprint and generated code. Based on
  aliasing of libraries function to generate direct call instead of
  indirect ones
* doc/libxml2-api.xml doc/Makefile.am doc/apibuild.py: added automatic
  generation of elfgcchack.h based on the API description, extended
  the API description to show the conditionals configuration flags
  required for symbols.
* nanohttp.c parser.c xmlsave.c include/libxml/*.h: lot of cleanup
* doc/*: regenerated the docs.
Daniel
2004-06-27 12:08:10 +00:00
Daniel Veillard
e8039dfec7 make sure we report errors if xmlNewInputFromFile() fails. avoid using
* libxml.h parserInternals.c xmlIO.c: make sure we report errors
  if xmlNewInputFromFile() fails.
* xmlreader.c: avoid using _private for the node or document
  elements.
Daniel
2003-10-27 11:25:13 +00:00
Daniel Veillard
2b0f879908 fixed a nasty bug with interning some text strings prepare for beta5 of
* SAX2.c: fixed a nasty bug with interning some text strings
* configure.in: prepare for beta5 of 2.6.0
* libxml.h nanoftp.c nanohttp.c xmlIO.c include/libxml/xmlerror.h:
  better error handling for I/O and converted FTP and HTTP
* parser.c: fixed another bug
Daniel
2003-10-10 19:36:36 +00:00
Igor Zlatkovic
a6ceeb412e no more win32config.h 2003-08-28 10:25:13 +00:00
Daniel Veillard
1638a47a88 Applied patch from Mikhail Grushinskiy for mingw compiler on Windows.
* Makefile.am configure.in example/Makefile.am libxml.h nanoftp.c
  nanohttp.c xmllint.c: Applied patch from Mikhail Grushinskiy for
  mingw compiler on Windows.
Daniel
2003-08-14 01:23:25 +00:00
Daniel Veillard
a880b12475 a lot of performance work especially the speed of streaming through the
* globals.c libxml.h parser.c parserInternals.c tree.c xmllint.c
  xmlreader.c include/libxml/parser.h: a lot of performance work
  especially the speed of streaming through the reader and push
  interface. Some thread related optimizations. Nearly doubled the
  speed of parsing through the reader.
Daniel
2003-04-21 21:36:41 +00:00
Daniel Veillard
3e59fc52d5 added support for large file, tested with a 3+GB instance, and some
* libxml.h include/libxml/parser.h parser.c xmlIO.c DOCBparser.c:
  added support for large file, tested with a 3+GB instance,
  and some cleanup.
* catalog.c: added a TODO
* Makefile.am: added some "make tests" comments
Daniel
2003-04-18 12:34:58 +00:00
Daniel Veillard
34ce8bece2 preparing 2.4.18 updated and rebuilt the web site implement the new
* configure.in: preparing 2.4.18
* doc/*: updated and rebuilt the web site
* *.c libxml.h: implement the new IN_LIBXML scheme discussed with
  the Windows and Cygwin maintainers.
* parser.c: humm, changed the way the SAX parser work when
  xmlSubstituteEntitiesDefault(1) is set, it will then
  do the entity registration and loading by itself in case the
  user provided SAX getEntity() returns NULL.
* testSAX.c: added --noent to test the behaviour.
Daniel
2002-03-18 19:37:11 +00:00
Daniel Veillard
8de85c6c00 try to avoid problems when compiling on Windows Daniel
* libxml.h: try to avoid problems when compiling on Windows
Daniel
2002-01-15 17:10:15 +00:00
Daniel Veillard
3c5ed91ac3 Applied following patches from Robert Collins and make sure IN_LIBXML is
* libxml.h: Applied following patches from Robert Collins
  and make sure IN_LIBXML is defined when compiling it
-------
* include/libxml/xmlversion.h.in (LIBXML_DLL_IMPORT): Use on Cygwin
  as well as Visual C.
* parser.c (XML_DIR_SEP): Don't use '\\' for Cygwin.
* parserInternals.c (XML_DIR_SEP): Don't use '\\' for Cygwin.
* strio.c (PLATFORM_UNIX): Define for Cygwin.
* triodef.h (TRIO_PLATFORM_UNIX): Define for Cygwin.
* xmlIO.c (xmlFileOpen): Use unix behaviour for Cygwin.
  Use binary mode opens for Cygwin (xmlFileOpenW xmlParserGetDirectory
  xmlSysIDExists xmlNoNetExists).
* xmllint.c: Don't include winsock2.h for Cygwin.
Daniel
2002-01-08 10:36:16 +00:00
Daniel Veillard
d3b08826fc integrated Eric Lavigne (sp???) contribution to build libxml2 on MacOS
* configure.in libxml.h parser.c testThreads.c macos/: integrated
  Eric Lavigne (sp???) contribution to build libxml2 on MacOS using
  CodeWarrior.
Daniel
2001-12-05 12:03:33 +00:00
Daniel Veillard
7cf5e44827 Tried to close bug #60131 Daniel
* libxml.h include/libxml/xmlversion.h.in
  include/libxml/xmlwin32version.h include/libxml/xmlwin32version.h.in:
  Tried to close bug #60131
Daniel
2001-09-10 20:16:32 +00:00
Daniel Veillard
5e2dace1ca Cleanup, cleanup .. removed libxml softlink for good cleanup to get 100%
Cleanup, cleanup ..
* configure.in Makefile.am: removed libxml softlink for good
* include/libxml/*.h *.c doc/Makefile.am: cleanup to get
  100% coverage by gtk-doc
Daniel
2001-07-18 19:30:27 +00:00
Daniel Veillard
87ee914013 - xpointer.c include/win32config.h win32/libxml2/libxml2.def.src
libxml.h : Yon Derek provided a set of changes to compile from
  CVS on Windows/MSC
Daniel
2001-06-28 12:54:16 +00:00
Daniel Veillard
6761eeea4d - libxml.h: fixed an error in last commit
- doc/FAQ.html: added an entry for compilation from CVS
Daniel
2001-06-11 10:29:38 +00:00
Daniel Veillard
9cc6dc62f7 - xmlversion.h.in libxml.h: Cygwin patches
- tree.c: xmlFreeNodeList patch similar to xmlFreeNode one
- tree.h: cleanup
Daniel
2001-06-11 08:09:20 +00:00
Bjorn Reese
70a9da54eb trio upgrade and integration 2001-04-21 16:57:29 +00:00