Commit f0cc7bda f0cc7bda9699c31f2c478928f78b16876db2fa25 by Sergey Poznyakoff

Bugfixes.

* mailbox/assoc.c (assoc_remove): Fix incorrect copying
between assoc slots.
* mailbox/cfg_parser.y (STRTONUM): Remove useless
dereferencing. Change the loop from `while' to `for'.
1 parent 50da8665
...@@ -173,7 +173,9 @@ assoc_remove (mu_assoc_t assoc, struct _mu_assoc_elem *elem) ...@@ -173,7 +173,9 @@ assoc_remove (mu_assoc_t assoc, struct _mu_assoc_elem *elem)
173 } 173 }
174 while ((j < r && r <= i) || (i < j && j < r) || (r <= i && i < j)); 174 while ((j < r && r <= i) || (i < j && j < r) || (r <= i && i < j));
175 175
176 *ASSOC_ELEM (assoc, j) = *ASSOC_ELEM (assoc, i); 176 if (j != i)
177 memcpy (ASSOC_ELEM (assoc, j), ASSOC_ELEM (assoc, i),
178 assoc->elsize);
177 } 179 }
178 return 0; 180 return 0;
179 } 181 }
......