Re: svn commit: samba r6182 - in branches/SAMBA_4_0/source/librpc/ndr: .

2005-04-04 Thread Richard Sharpe
On Mon, 4 Apr 2005, Stefan (metze) Metzmacher wrote:

 [EMAIL PROTECTED] schrieb:
 | Author: sharpe
 | Date: 2005-04-03 03:58:45 + (Sun, 03 Apr 2005)
 | New Revision: 6182
 |
 | WebSVN: 
 http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6182
 |
 | Log:
 |
 | Jelmer, I think we need to initialize the switch_list, else we are
 | crash city.
[Deletia ...]
 | ndr-depth = 1;
 | ndr-flags = 0;
 | +   ndr-switch_list = talloc(ndr, struct ndr_token_list);
 | +   if (!ndr-switch_list)
 | +   goto fail;

 I can't see how this can fix the problem, when we initialize a pointer with 
 another
 uninitialized struct...

Sigh, yeah, I didn't look at what DLIST_ADD was doing ...

Regards
-
Richard Sharpe, rsharpe[at]richardsharpe.com, rsharpe[at]samba.org,
sharpe[at]ethereal.com, http://www.richardsharpe.com


Re: svn commit: samba r6182 - in branches/SAMBA_4_0/source/librpc/ndr: .

2005-04-03 Thread Stefan (metze) Metzmacher
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
[EMAIL PROTECTED] schrieb:
| Author: sharpe
| Date: 2005-04-03 03:58:45 + (Sun, 03 Apr 2005)
| New Revision: 6182
|
| WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6182
|
| Log:
|
| Jelmer, I think we need to initialize the switch_list, else we are
| crash city.
|
|
| Modified:
|branches/SAMBA_4_0/source/librpc/ndr/ndr.c
|
|
| Changeset:
| Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c
| ===
| --- branches/SAMBA_4_0/source/librpc/ndr/ndr.c2005-04-02 22:46:21 UTC 
(rev 6181)
| +++ branches/SAMBA_4_0/source/librpc/ndr/ndr.c2005-04-03 03:58:45 UTC 
(rev 6182)
| @@ -320,7 +320,11 @@
|   ndr-print = ndr_print_debug_helper;
|   ndr-depth = 1;
|   ndr-flags = 0;
| + ndr-switch_list = talloc(ndr, struct ndr_token_list);
| + if (!ndr-switch_list)
| + goto fail;
I can't see how this can fix the problem, when we initialize a pointer with 
another
uninitialized struct...
I have fixed it in rev 6188
- --
metze
Stefan Metzmacher metze at samba.org www.samba.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3-nr1 (Windows XP)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCUNZOm70gjA5TCD8RAkU8AJ9r5I7FfQFzBZnxbfWVvFUfjk5GKQCdG/cO
ZBdUoET0QudgKGpRpZdWmWg=
=P0EW
-END PGP SIGNATURE-


svn commit: samba r6182 - in branches/SAMBA_4_0/source/librpc/ndr: .

2005-04-02 Thread sharpe
Author: sharpe
Date: 2005-04-03 03:58:45 + (Sun, 03 Apr 2005)
New Revision: 6182

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6182

Log:

Jelmer, I think we need to initialize the switch_list, else we are 
crash city.


Modified:
   branches/SAMBA_4_0/source/librpc/ndr/ndr.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c
===
--- branches/SAMBA_4_0/source/librpc/ndr/ndr.c  2005-04-02 22:46:21 UTC (rev 
6181)
+++ branches/SAMBA_4_0/source/librpc/ndr/ndr.c  2005-04-03 03:58:45 UTC (rev 
6182)
@@ -320,7 +320,11 @@
ndr-print = ndr_print_debug_helper;
ndr-depth = 1;
ndr-flags = 0;
+   ndr-switch_list = talloc(ndr, struct ndr_token_list);
+   if (!ndr-switch_list)
+   goto fail;
fn(ndr, name, ptr);
+fail:
talloc_free(ndr);
 }