Hi, just found this one in 1.0.x and 1.1 branch code in rlm_pam.c: #define GET_MEM if (reply) realloc(reply, size); else reply = rad_malloc(size); \ This is changed on trunk already but it should be changed on 1.0 and 1.1 branches as well, because it really seems to fail if the statement is true but realloc() has to move the memory to another location. reply is not updated in this case. So the easiest fix would be: #define GET_MEM if (reply) reply = realloc(reply, size); else reply = rad_malloc(size); \ (or to take the changes from trunk) CU, Wolfgang -- SUSE LINUX GmbH -o) Tel: +49-(0)911-740 53 0 Maxfeldstr. 5 /\\ Fax: +49-(0)911-740 53 679 90409 Nuernberg, Germany _\_v simply change to www.suse.com
Wolfgang Rosenauer wrote:
just found this one in 1.0.x and 1.1 branch code in rlm_pam.c:
#define GET_MEM if (reply) realloc(reply, size); else reply = rad_malloc(size); \
This is changed on trunk already but it should be changed on 1.0 and 1.1 branches as well, because it really seems to fail if the statement is true but realloc() has to move the memory to another location. reply is not updated in this case. So the easiest fix would be:
#define GET_MEM if (reply) reply = realloc(reply, size); else reply = rad_malloc(size); \
Thanks for the report. The fix above is trivial, so I've added it to the branch 1.1. As Alan said, we'd like to close off any change to 1.1.0, that's why I didn't pull the changes from CVS head. -- Nicolas Baradakis
On December 21, 2005 12:58:53 PM +0100 Nicolas Baradakis <nbk@sitadelle.com> wrote:
Wolfgang Rosenauer wrote:
just found this one in 1.0.x and 1.1 branch code in rlm_pam.c:
# define GET_MEM if (reply) realloc(reply, size); else reply = rad_malloc(size); \
This is changed on trunk already but it should be changed on 1.0 and 1.1 branches as well, because it really seems to fail if the statement is true but realloc() has to move the memory to another location. reply is not updated in this case. So the easiest fix would be:
# define GET_MEM if (reply) reply = realloc(reply, size); else reply = rad_malloc(size); \
Thanks for the report. The fix above is trivial, so I've added it to the branch 1.1.
As Alan said, we'd like to close off any change to 1.1.0, that's why I didn't pull the changes from CVS head.
Since GET_MEM is a bug anyway (even when re-written to be correct), why not pull from the head? It's not that severe of a change. -frank
Frank Cusack wrote:
# define GET_MEM if (reply) reply = realloc(reply, size); else reply = rad_malloc(size); \
Thanks for the report. The fix above is trivial, so I've added it to the branch 1.1.
Since GET_MEM is a bug anyway (even when re-written to be correct), why not pull from the head? It's not that severe of a change.
I don't use the rlm_pam module, and I don't know if the changes from CVS head are safe. I've chosen the one-line-fix from Wolfgang because obviously it's harmless. I don't want to break anything between the releases 1.1.0-pre0 and 1.1.0. However, if you think the change in CVS head is better, of course it should be applied to branch 1.1. (you know the rlm_pam module a lot better than me) -- Nicolas Baradakis
participants (3)
-
Frank Cusack -
Nicolas Baradakis -
Wolfgang Rosenauer