PERMISSIONS: Add missing check for string token.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 12 Sep 2010 21:05:59 +0000 (14:05 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Fri, 24 Sep 2010 03:45:30 +0000 (20:45 -0700)
src/language/utilities/permissions.c

index 03458fcef01671f4ea4b263873ff89ebe86a7a2b..967b1bd2a1c314cca681dd78516084fd30921994 100644 (file)
@@ -47,6 +47,9 @@ cmd_permissions (struct lexer *lexer, struct dataset *ds UNUSED)
   if (lex_match_id (lexer, "FILE"))
     lex_match (lexer, '=');
 
+  if (!lex_force_string (lexer))
+    return CMD_FAILURE;
+
   fn = ds_xstrdup (lex_tokstr (lexer));
   lex_force_match (lexer, T_STRING);