~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/lib/GL/mesa/src/drv/ffb/ffb_fifo.h

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_fifo.h,v 1.2 2002/02/22 21:32:58 dawes Exp $ */
 
2
 
 
3
#ifndef _FFB_FIFO_H
 
4
#define _FFB_FIFO_H
 
5
 
 
6
#define FFBFifo(__fmesa, __n) \
 
7
do {    ffbScreenPrivate *__fScrn = (__fmesa)->ffbScreen; \
 
8
        int __cur_slots = __fScrn->fifo_cache; \
 
9
        if ((__cur_slots - (__n)) < 0) { \
 
10
                ffb_fbcPtr __ffb = __fmesa->regs; \
 
11
                do { __cur_slots = (((int)__ffb->ucsr & FFB_UCSR_FIFO_MASK) - 4); \
 
12
                } while ((__cur_slots - (__n)) < 0); \
 
13
        } (__fScrn)->fifo_cache = (__cur_slots - (__n)); \
 
14
} while(0)
 
15
 
 
16
#define FFBWait(__fmesa, __ffb) \
 
17
do {    ffbScreenPrivate *__fScrn = (__fmesa)->ffbScreen; \
 
18
        if (__fScrn->rp_active) { \
 
19
                unsigned int __regval = (__ffb)->ucsr; \
 
20
                while((__regval & FFB_UCSR_ALL_BUSY) != 0) { \
 
21
                        __regval = (__ffb)->ucsr; \
 
22
                } \
 
23
                __fScrn->fifo_cache = ((int)(__regval & FFB_UCSR_FIFO_MASK)) - 4; \
 
24
                __fScrn->rp_active = 0; \
 
25
        } \
 
26
} while(0)
 
27
 
 
28
#endif /* !(_FFB_FIFO_H) */