(parse_keys): abort when detecting errors

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5292 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-01-30 18:16:57 +00:00
parent dece78446f
commit b67c0c5636

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 1998 Kungliga Tekniska H<>gskolan * Copyright (c) 1997, 1998, 1999 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden). * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved. * All rights reserved.
* *
@@ -135,10 +135,11 @@ parse_keys(hdb_entry *ent, char *str)
unsigned type; unsigned type;
size_t p_len; size_t p_len;
if(sscanf(p, "%u/", &type) != 1){ if(sscanf(p, "%u/", &type) != 1){
abort ();
} }
p = strchr(p, '/'); p = strchr(p, '/');
if(p == NULL); if(p == NULL)
abort ();
p++; p++;
p_len = strlen(p); p_len = strlen(p);