for (i=0; line[i]; i++) if (line[i] == ',') line[i] = '.';
if ((cp = strchr (line, '.')) == NULL) {
+ if (strlen(line) > 9) {
+ fprintf (stderr, "Betrag %s zu gross (max. 9 Stellen)\n", line);
+ return 0;
+ }
if ((valC[recindex] = (char *)malloc (strlen(line)+4)) == NULL)
return 0;
sprintf (valC[recindex], "%s.00", line);
} else if ( ((len = cp - line + 3)) < strlen (line)) {
+ if (cp - line > 9) {
+ fprintf (stderr, "Betrag %s zu gross (max. 9.2 Stellen)\n", line);
+ return 0;
+ }
if ((valC[recindex] = (char *)malloc (len+1)) == NULL)
return 0;
strncpy (valC[recindex], line, len);
valC[recindex][len] = '\0';
} else {
+ if (cp - line > 9) {
+ fprintf (stderr, "Betrag %s zu gross (max. 9.2 Stellen)\n", line);
+ return 0;
+ }
if ((valC[recindex] = (char *)malloc (strlen(line)+1)) == NULL)
return 0;
strcpy(valC[recindex], line);