rpms/freeradius/devel freeradius-1.0.4-realloc-return.patch, NONE, 1.1 freeradius.spec, 1.23, 1.24
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed Nov 9 09:39:45 UTC 2005
Author: tmraz
Update of /cvs/dist/rpms/freeradius/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv3711
Modified Files:
freeradius.spec
Added Files:
freeradius-1.0.4-realloc-return.patch
Log Message:
- fixed ignored return value of realloc
freeradius-1.0.4-realloc-return.patch:
rlm_pam.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
--- NEW FILE freeradius-1.0.4-realloc-return.patch ---
--- freeradius-1.0.4/src/modules/rlm_pam/rlm_pam.c.realloc-return 2004-02-26 20:04:33.000000000 +0100
+++ freeradius-1.0.4/src/modules/rlm_pam/rlm_pam.c 2005-11-09 10:25:11.000000000 +0100
@@ -122,11 +122,15 @@
struct pam_response **resp,
void *appdata_ptr) {
int count = 0, replies = 0;
- struct pam_response *reply = NULL;
+ struct pam_response *reply = NULL, *nreply = NULL;
int size = sizeof(struct pam_response);
my_PAM *pam_config = (my_PAM *) appdata_ptr;
-#define GET_MEM if (reply) realloc(reply, size); else reply = rad_malloc(size); \
+#define GET_MEM if (reply) { nreply=realloc(reply, size); \
+ if (!nreply) { free(reply); return PAM_CONV_ERR; } \
+ reply = nreply; \
+ } else reply = rad_malloc(size); \
+ if (!reply) { return PAM_CONV_ERR; } \
size += sizeof(struct pam_response)
#define COPY_STRING(s) ((s) ? strdup(s) : NULL)
Index: freeradius.spec
===================================================================
RCS file: /cvs/dist/rpms/freeradius/devel/freeradius.spec,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- freeradius.spec 9 Nov 2005 08:49:23 -0000 1.23
+++ freeradius.spec 9 Nov 2005 09:39:42 -0000 1.24
@@ -19,6 +19,7 @@
Patch7: freeradius-1.0.2-sasl2.patch
Patch8: freeradius-1.0.0-samba3.patch
Patch10: freeradius-1.0.4-build.patch
+Patch11: freeradius-1.0.4-realloc-return.patch
%description
The FreeRADIUS Server Project is a high performance and highly configurable
@@ -110,6 +111,7 @@
%patch7 -p1 -b .sasl2
%patch8 -p1 -b .samba3
%patch10 -p1 -b .build
+%patch11 -p1 -b .realloc-return
%build
@@ -265,6 +267,7 @@
%changelog
* Wed Nov 9 2005 Tomas Mraz <tmraz at redhat.com> - 1.0.4-4
- rebuilt with new openssl
+- fixed ignored return value of realloc
* Fri Sep 30 2005 Tomas Mraz <tmraz at redhat.com> - 1.0.4-3
- use include instead of pam_stack in pam config
More information about the fedora-cvs-commits
mailing list