~ubuntu-branches/ubuntu/lucid/bogofilter/lucid-security

« back to all changes in this revision

Viewing changes to src/base64.c

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar
  • Date: 2009-05-06 05:41:52 UTC
  • mfrom: (1.1.11 upstream) (2.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090506054152-tgameecssbuv4np6
Tags: 1.2.0-2ubuntu1
* Merge from debian unstable, remaining changes: LP: #372497
  - don't build qdbm.
  - Don't build tokyocabinet support as it's in universe.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: base64.c 6543 2006-07-08 15:29:50Z m-a $ */
 
1
/* $Id: base64.c 6766 2009-01-12 04:27:36Z relson $ */
2
2
 
3
3
/** \file base64.c
4
4
 * decode base64 encoded text
26
26
{
27
27
    uint count = 0;
28
28
    uint size = word->leng;
29
 
    byte *s = word->text;               /* src */
30
 
    byte *d = word->text;               /* dst */
 
29
    byte *s = word->u.text;             /* src */
 
30
    byte *d = word->u.text;             /* dst */
31
31
 
32
32
    if (!base64_validate(word))
33
33
        return size;
96
96
    base64_init();
97
97
 
98
98
    for (i = 0; i < word->leng; i += 1) {
99
 
        byte b = word->text[i];
 
99
        byte b = word->u.text[i];
100
100
        byte v = base64_xlate[b];
101
101
        if (v == 0 && b != 'A' && b != '\n' && b != '\r')
102
102
            return false;