← Commit list

da2244fe4

Denys Vlasenko
Denys Vlasenko
2017-07-21
SUCCESS Duration: 145s

Subject

ash: use mempcpy() where appropriate

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/ash.c+2 -2
@@ -2315,10 +2315,10 @@ setvar(const char *name, const char *val, int flags)
INT_OFF;
nameeq = ckmalloc(namelen + vallen + 2);
- p = memcpy(nameeq, name, namelen) + namelen;
+ p = mempcpy(nameeq, name, namelen);
if (val) {
*p++ = '=';
- p = memcpy(p, val, vallen) + vallen;
+ p = mempcpy(p, val, vallen);
}
*p = '\0';
setvareq(nameeq, flags | VNOSAVE);