~ubuntu-branches/ubuntu/hardy/freeradius/hardy-proposed

« back to all changes in this revision

Viewing changes to src/lib/token.c

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2006-12-16 20:45:11 UTC
  • mfrom: (3.1.10 feisty)
  • Revision ID: james.westby@ubuntu.com-20061216204511-3pbbsu4s8jtehsor
Tags: 1.1.3-3
Fix POSIX compliance problem in init script.  Closes: #403384. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * token.c      Read the next token from a string.
3
3
 *              Yes it's pretty primitive but effective.
4
4
 *
5
 
 * Version:     $Id: token.c,v 1.17 2003/09/12 19:25:29 phampson Exp $
 
5
 * Version:     $Id: token.c,v 1.17.2.1.2.1 2006/03/15 15:37:58 nbk Exp $
6
6
 *
7
7
 *   This library is free software; you can redistribute it and/or
8
8
 *   modify it under the terms of the GNU Lesser General Public
16
16
 *
17
17
 *   You should have received a copy of the GNU Lesser General Public
18
18
 *   License along with this library; if not, write to the Free Software
19
 
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
 
19
 *   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20
20
 *
21
21
 * Copyright 2000  The FreeRADIUS server project
22
22
 */
27
27
#include <ctype.h>
28
28
#include "token.h"
29
29
 
30
 
static const char rcsid[] = "$Id: token.c,v 1.17 2003/09/12 19:25:29 phampson Exp $";
 
30
static const char rcsid[] = "$Id: token.c,v 1.17.2.1.2.1 2006/03/15 15:37:58 nbk Exp $";
31
31
 
32
32
static const LRAD_NAME_NUMBER tokens[] = {
33
33
        { "=~", T_OP_REG_EQ,    }, /* order is important! */
116
116
        s = buf;
117
117
        escape = 0;
118
118
 
119
 
        while (*p && buflen-- > 0) {
 
119
        while (*p && buflen-- > 1) {
120
120
                if (escape) {
121
121
                        escape = 0;
122
122
                        switch(*p) {