~ubuntu-branches/debian/sid/net-tools/sid

« back to all changes in this revision

Viewing changes to lib/getargs.c

  • Committer: Package Import Robot
  • Author(s): Martín Ferrari
  • Date: 2015-09-07 01:54:07 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20150907015407-v2tfsgxayjd3iq4i
Tags: 1.60+git20150829.73cef8a-1
* After 14 years without an upstream release, I am producing a new package
  based on today's upstream repository.
  Closes: #391495, #486448, #323261, #260587, #545328, #511395.
* Remove many patches now merged upstream, delete unmaintainable and
  undocumented local changes, and update the rest.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <unistd.h>
25
25
#include "net-support.h"
26
26
#include "pathnames.h"
 
27
#include "util.h"
27
28
 
28
29
 
29
30
/* Split the input string into multiple fields. */
30
31
int getargs(char *string, char *arguments[])
31
32
{
32
 
    int len = strlen(string); 
 
33
    int len = strlen(string);
33
34
    char temp[len+1];
34
35
    char *sp, *ptr;
35
36
    int i, argc;
41
42
     */
42
43
    sp = string;
43
44
    i = 0;
44
 
    strcpy(temp, string);
 
45
    safe_strncpy(temp, string, sizeof(temp));
45
46
    ptr = temp;
46
47
 
47
48
    /*