|
@@ -223,8 +223,11 @@ static inline int get_all_db_ucontacts(void *buf, int len, unsigned int flags,
|
|
|
/* write path */
|
|
|
memcpy(cp, &p1_len, sizeof(p1_len));
|
|
|
cp = (char*)cp + sizeof(p1_len);
|
|
|
- memcpy(cp, p1, p1_len);
|
|
|
- cp = (char*)cp + p1_len;
|
|
|
+ /* copy path only if exist */
|
|
|
+ if(p1_len){
|
|
|
+ memcpy(cp, p1, p1_len);
|
|
|
+ cp = (char*)cp + p1_len;
|
|
|
+ }
|
|
|
|
|
|
len -= needed;
|
|
|
} /* row cycle */
|