summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* libXv 1.0.10libXv-1.0.10Alan Coopersmith2013-09-071-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Remove fallback for _XEatDataWords, require libX11 1.6 for itAlan Coopersmith2013-07-052-19/+1
| | | | | | | | | | | | _XEatDataWords was orignally introduced with the May 2013 security patches, and in order to ease the process of delivering those, fallback versions of _XEatDataWords were included in the X extension library patches so they could be applied to older versions that didn't have libX11 1.6 yet. Now that we're past that hurdle, we can drop the fallbacks and just require libX11 1.6 for building new versions of the extension libraries. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Refactor error handlingAlan Coopersmith2013-07-051-81/+110
| | | | | | Reduce code duplication, make error checking & cleanup more consistent Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Add missing calls to _XEatDataWords when we are skipping _XReadAlan Coopersmith2013-07-051-0/+2
| | | | | | | | If we failed to allocate the buffer to _XRead into, discard the rest of the reply, instead of leaving it to confuse the reading of the next reply. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Replace custom copy of GetReq macro with call to Xlib 1.5's _XGetRequestAlan Coopersmith2013-07-052-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | xvproto.h names don't match those required by the Xlibint.h GetReq* macros, but at least we can rely on the _XGetRequest function for the bulk of the work now, instead of duplicating it. Also clears clang warnings repeated for every request function: Xv.c:137:5: warning: cast from 'char *' to 'xvQueryExtensionReq *' increases re quired alignment from 1 to 2 [-Wcast-align] XvGetReq(QueryExtension, req); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./Xvlibint.h:52:8: note: expanded from macro 'XvGetReq' req = (xv##name##Req *)(dpy->last_req = dpy->bufptr);\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Xv.c:137:5: warning: implicit conversion loses integer precision: 'int' to 'CAR D8' (aka 'unsigned char') [-Wconversion] XvGetReq(QueryExtension, req); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./Xvlibint.h:53:30: note: expanded from macro 'XvGetReq' req->reqType = info->codes->major_opcode;\ ~ ~~~~~~~~~~~~~^~~~~~~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Require ANSI C89 pre-processor, drop pre-C89 token pasting supportAlan Coopersmith2013-07-051-15/+0
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
* Use pad_to_int32 macro instead of repeated (x + 3) & ~3 patternAlan Coopersmith2013-07-051-5/+7
| | | | | | | Makes code clearer, and using ~3U instead of ~3 clears some signed int warnings. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Fix sign conversion & comparison warnings from clangAlan Coopersmith2013-07-051-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clears up: Xv.c:196:21: warning: implicit conversion changes signedness: 'CARD32' (aka 'unsigned int') to 'int' [-Wsign-conversion] size = rep.length << 2; ~ ~~~~~~~~~~~^~~~ Xv.c:212:41: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] if ((pas=(XvAdaptorInfo *)Xmalloc(size))==NULL) { ~~~~~~~~^~~~~ Xv.c:236:43: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] pa->num_adaptors = rep.num_adaptors - ii; ~ ~~~~~~~~~~~~~~~~~^~~~ Xv.c:243:40: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] if ( (name = (char *)Xmalloc(size+1)) == NULL) ~~~~~~~~~~~~^~~ Xv.c:251:37: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] (void)strncpy(name, u.string, size); ~~~~~~~ ^~~~ Xv.c:260:36: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] if ((pfs=(XvFormat *)Xmalloc(size))==NULL) { ~~~~~~~~^~~~~ Xv.c:269:20: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] for (jj=0; jj<pa->num_formats; jj++) { ~~^~~~~~~~~~~~~~~~ Xv.c:259:29: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] size = pa->num_formats*sizeof(XvFormat); ~ ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ Xv.c:305:16: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] for (ii=0; ii<pAdaptors->num_adaptors; ii++, pa++) ~~^~~~~~~~~~~~~~~~~~~~~~~~ Xv.c:356:21: warning: implicit conversion changes signedness: 'CARD32' (aka 'unsigned int') to 'int' [-Wsign-conversion] size = rep.length << 2; ~ ~~~~~~~~~~~^~~~ Xv.c:369:41: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] if ( (pes = (XvEncodingInfo *)Xmalloc(size)) == NULL) { ~~~~~~~~^~~~~ Xv.c:392:45: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] pe->num_encodings = rep.num_encodings - jj; ~ ~~~~~~~~~~~~~~~~~~^~~~ Xv.c:397:40: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] if ( (name = (char *)Xmalloc(size+1)) == NULL) { ~~~~~~~~~~~~^~~ Xv.c:404:31: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] strncpy(name, u.string, size); ~~~~~~~ ^~~~ Xv.c:433:16: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] for (ii=0; ii<pEncodings->num_encodings; ii++, pe++) { ~~^~~~~~~~~~~~~~~~~~~~~~~~~~ Xv.c:886:27: warning: comparison of integers of different signs: 'int' and 'CAR D32' (aka 'unsigned int') [-Wsign-compare] for (i = 0; i < rep.num_attributes; i++) { ~ ^ ~~~~~~~~~~~~~~~~~~ Xv.c:946:27: warning: comparison of integers of different signs: 'int' and 'CAR D32' (aka 'unsigned int') [-Wsign-compare] for (i = 0; i < rep.num_formats; i++) { ~ ^ ~~~~~~~~~~~~~~~ Xv.c:1100:5: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare] SetReqLen(req, len, len); ^~~~~~~~~~~~~~~~~~~~~~~~ X11/Xlibint.h:530:27: note: expanded from macro 'SetReqLen' if ((req->length + n) > (unsigned)65535) { \ ^ ~~~~~~~~~~~~~~~ Xv.c:1100:20: warning: implicit conversion changes signedness: 'int' to 'unsigned int' [-Wsign-conversion] SetReqLen(req, len, len); ~~~~~~~~~~~~~~~^~~~~~~~~ X11/Xlibint.h:532:21: note: expanded from macro 'SetReqLen' MakeBigReq(req,n) \ ^ X11/Xlibint.h:505:35: note: expanded from macro 'MakeBigReq' ((CARD32 *)req)[1] = _BRlen + n + 2; \ ~ ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Remove unnecessary casts from Xmalloc callsAlan Coopersmith2013-07-051-7/+7
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
* Adopt X.Org standard code style, with consistent indentationAlan Coopersmith2013-06-223-1192/+1154
| | | | | | Having differing indent levels of 2, 3, & 4 spaces hurts my eyes. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* libXv 1.0.9libXv-1.0.9Alan Coopersmith2013-06-221-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Bug 65252: Ensure final name is nil-terminated & none point to uninitialized ↵Daphne Pfister2013-06-011-2/+6
| | | | | | | | | | | memory. This patch attempts to fix this bug by ensuring that there is at least one nil byte at the end of all the name strings. This should prevent reading past the end of the allocation as well as exposing uninitialized memory. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* XvQueryPortAttributes: add a comment explaining memory strategyAlan Coopersmith2013-06-011-0/+11
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* libXv 1.0.8libXv-1.0.8Alan Coopersmith2013-05-311-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* integer overflow in XvCreateImage() [CVE-2013-1989 3/3]Alan Coopersmith2013-05-071-1/+4
| | | | | | | | | | num_planes is a CARD32 and needs to be bounds checked before bit shifting and adding to sizeof(XvImage) to come up with the total size to allocate, to avoid integer overflow leading to underallocation and writing data from the network past the end of the allocated buffer. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* integer overflow in XvListImageFormats() [CVE-2013-1989 2/3]Alan Coopersmith2013-05-071-2/+3
| | | | | | | | | | num_formats is a CARD32 and needs to be bounds checked before multiplying by sizeof(XvImageFormatValues) to come up with the total size to allocate, to avoid integer overflow leading to underallocation and writing data from the network past the end of the allocated buffer. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* buffer overflow in XvQueryPortAttributes() [CVE-2013-2066]Alan Coopersmith2013-05-071-2/+8
| | | | | | | | | | Each attribute returned in the reply includes the number of bytes to read for its marker. We had been always trusting it, and never validating that it wouldn't cause us to write past the end of the buffer we allocated based on the reported text_size. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* integer overflow in XvQueryPortAttributes() [CVE-2013-1989 1/3]Alan Coopersmith2013-04-261-2/+8
| | | | | | | | | | | The num_attributes & text_size members of the reply are both CARD32s and need to be bounds checked before multiplying & adding them together to come up with the total size to allocate, to avoid integer overflow leading to underallocation and writing data from the network past the end of the allocated buffer. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Use _XEatDataWords to avoid overflow of rep.length shiftingAlan Coopersmith2013-04-132-3/+25
| | | | | | rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* autogen.sh: Implement GNOME Build APIColin Walters2013-01-151-1/+3
| | | | | | http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Adam Jackson <ajax@redhat.com>
* configure: Remove AM_MAINTAINER_MODEAdam Jackson2013-01-151-1/+0
| | | | Signed-off-by: Adam Jackson <ajax@redhat.com>
* Uppercase SH arguments.Thomas Klausner2012-08-241-8/+8
| | | | | | Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* libXv 1.0.7libXv-1.0.7Alan Coopersmith2012-03-071-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Fix gcc -Wwrite-strings warningsAlan Coopersmith2011-11-101-2/+2
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* XvQueryExtension doesn't return XvBadAllocJeremy Huddleston2011-10-051-4/+0
| | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=22829 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
* Strip trailing whitespaceAlan Coopersmith2011-09-167-132/+132
| | | | | | | Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}' git diff -w & git diff -b show no diffs from this change Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* config: comment, minor upgrade, quote and layout configure.acGaetan Nadon2011-02-021-41/+40
| | | | | | | | | | | | | | Group statements per section as per Autoconf standard layout Quote statements where appropriate. Autoconf recommends not using dnl instead of # for comments Use AC_CONFIG_FILES to replace the deprecated AC_OUTPUT with parameters. Add AC_CONFIG_SRCDIR([Makefile.am]) Remove redundant AC_SUBST(*_CFLAGS) and/or *_LIBS No functional configuration changes This helps automated maintenance and release activities. Details can be found in http://wiki.x.org/wiki/NewModuleGuidelines
* config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERSGaetan Nadon2011-01-281-1/+1
| | | | Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
* config: remove AC_PROG_CC as it overrides AC_PROG_C_C99Gaetan Nadon2011-01-271-1/+0
| | | | | | | | XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls AC_PROG_C_C99. This sets gcc with -std=gnu99. If AC_PROG_CC macro is called afterwards, it resets CC to gcc. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
* libXv 1.0.6libXv-1.0.6Alan Coopersmith2010-10-291-1/+2
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Sun's copyrights now belong to OracleAlan Coopersmith2010-10-291-2/+2
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Purge cvs tags.Jesse Adkins2010-10-063-4/+0
| | | | | Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* man: whitespace managementGaetan Nadon2010-08-181-27/+27
| | | | Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
* man: remove unrequired local fix for bug 5628Gaetan Nadon2010-08-183-8/+3
| | | | | | | | Local fix in CVS for bug 5628 is not required as the problem has been fixed in util-macros d9062e4077ebfd0985baf8418f3d0f111b9ddbba Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
* config: upgrade to util-macros 1.8 for additional man page supportAlan Coopersmith2010-07-082-15/+8
| | | | | | | | | | Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS The value of MAN_SUBST is the same for all X.Org packages. Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS Enables use of platform appropriate version of sed. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Purge macro NEED_REPLIESFernando Carrijo2010-07-081-2/+0
| | | | | | Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* config: update AC_PREREQ statement to 2.60Gaetan Nadon2010-03-291-1/+1
| | | | | | | | | | Unrelated to the previous patches, the new value simply reflects the reality that the minimum level for autoconf to configure all x.org modules is 2.60 dated June 2006. ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
* config: remove the pkgconfig pc.in file from EXTRA_DISTGaetan Nadon2010-03-291-1/+0
| | | | | | Automake always includes it in the tarball. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
* Update Sun license notices to current X.Org standard formAlan Coopersmith2010-01-141-22/+19
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILESGaetan Nadon2009-11-271-0/+1
| | | | | Now that the INSTALL file is generated. Allows running make maintainer-clean.
* INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206Gaetan Nadon2009-10-283-2/+5
| | | | | | | Add missing INSTALL file. Use standard GNU file on building tarball README may have been updated Remove AUTHORS file as it is empty and no content available yet. Remove NEWS file as it is empty and no content available yet.
* Deploy the new XORG_DEFAULT_OPTIONS #24242Gaetan Nadon2009-10-271-3/+4
| | | | | | This macro aggregate a number of existing macros that sets commmon X.Org components configuration options. It shields the configuration file from future changes.
* Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432Gaetan Nadon2009-10-261-1/+1
| | | | | ChangeLog filename is known to Automake and requires no further coding in the makefile.
* .gitignore: use common defaults with custom section # 24239Gaetan Nadon2009-10-221-14/+62
| | | | | | Using common defaults will reduce errors and maintenance. Only the very small or inexistent custom section need periodic maintenance when the structure of the component changes. Do not edit defaults.
* This is not a GNU project, so declare it foreign.Jeremy Huddleston2009-10-211-1/+1
| | | | | | | | | | | | | | | | | | On Wed, 2009-10-21 at 13:36 +1000, Peter Hutterer wrote: > On Tue, Oct 20, 2009 at 08:23:55PM -0700, Jeremy Huddleston wrote: > > I noticed an INSTALL file in xlsclients and libXvMC today, and it > > was quite annoying to work around since 'autoreconf -fvi' replaces > > it and git wants to commit it. Should these files even be in git? > > Can I nuke them for the betterment of humanity and since they get > > created by autoreconf anyways? > > See https://bugs.freedesktop.org/show_bug.cgi?id=24206 As an interim measure, replace AM_INIT_AUTOMAKE([dist-bzip2]) with AM_INIT_AUTOMAKE([foreign dist-bzip2]). This will prevent the generation of the INSTALL file. It is also part of the 24206 solution. Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
* libXv 1.0.5libXv-1.0.5Alan Coopersmith2009-10-031-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONSAlan Coopersmith2009-10-032-9/+6
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* Convert documentation from xv-library-v2.2.txt into man pagesAlan Coopersmith2009-10-0311-12/+403
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* Man page cleanups and formatting fixesAlan Coopersmith2009-10-0320-513/+622
| | | | | | | | | | | | - Convert man page section headings to traditional style/names Make them all caps, and use 'synopsis' instead of 'syntax' - Strip trailing whitespace from man pages - Add return types to function prototypes - Fix unbalanced quoting and other formatting issues - Use .BR for formatting man page references - Add "libXv Functions" to man page header Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* Move xv-library-v2.2.txt document from xorg-docsAlan Coopersmith2009-10-011-0/+300
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>