~ubuntu-branches/ubuntu/vivid/libxrender/vivid

« back to all changes in this revision

Viewing changes to src/Xrenderint.h

  • Committer: Package Import Robot
  • Author(s): Julien Cristau
  • Date: 2013-05-14 19:28:26 UTC
  • Revision ID: package-import@ubuntu.com-20130514192826-4chanhewykpx3ni8
Tags: 1:0.9.7-1+deb7u1
integer overflows calculating memory needs for replies [CVE-2013-1987]

Show diffs side-by-side

added added

removed removed

Lines of Context:
109
109
#define DataInt32(dpy,d,len)    Data(dpy,(char *) (d),len)
110
110
#endif
111
111
 
 
112
#ifndef HAVE__XEATDATAWORDS
 
113
#include <X11/Xmd.h>  /* for LONG64 on 64-bit platforms */
 
114
#include <limits.h>
 
115
 
 
116
static inline void _XEatDataWords(Display *dpy, unsigned long n)
 
117
{
 
118
# ifndef LONG64
 
119
    if (n >= (ULONG_MAX >> 2))
 
120
        _XIOError(dpy);
 
121
# endif
 
122
    _XEatData (dpy, n << 2);
 
123
}
 
124
#endif
 
125
 
112
126
#endif /* _XRENDERINT_H_ */