OSDN Git Service

add argument check in setenv()
authorXishi Qiu <qiuxishi@huawei.com>
Tue, 4 Nov 2014 11:26:28 +0000 (19:26 +0800)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 23 Jan 2015 19:59:27 +0000 (20:59 +0100)
commit217f0a86c07beae6a27d422b5f46ee853f3a447a
treedd320393d0004787a6c530493f1af43441c1bdff
parenta952a1dd2bba69da4c52a111600f4279aadc3602
add argument check in setenv()

setenv() in glibc/eglibc will check the argument, like this,
  ...
  if (name == NULL || *name == '\0' || strchr (name, '=') != NULL)
    {
      __set_errno (EINVAL);
      return -1;
    }
  ...
So add argument check in uclibc's setenv() too.

Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
libc/stdlib/setenv.c