Changeset 651988747506d25414e2375c0eb1b41f0ca3aaf9
- Timestamp:
- 06/27/12 18:09:05
(1 year ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1340820545 -0400
- git-parent:
[9032e5d456a621f93ed59e03c9fbaea9f64454b0]
- git-author:
- Russell Haering <russell.haering@rackspace.com> 1340820545 -0400
- Message:
Various security fixes.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r4496cc4 |
r6519887 |
|
| 439 | 439 | */ |
|---|
| 440 | 440 | if(template_v1pdu->trap_type == SNMP_TRAP_ENTERPRISESPECIFIC) { |
|---|
| | 441 | if(template_v1pdu->enterprise_length + 2 > MAX_OID_LEN) { |
|---|
| | 442 | noitL(nlerr, "send_trap: enterprise_length too large\n"); |
|---|
| | 443 | snmp_free_pdu(template_v2pdu); |
|---|
| | 444 | return NULL; |
|---|
| | 445 | } |
|---|
| 441 | 446 | memcpy(enterprise, template_v1pdu->enterprise, |
|---|
| 442 | 447 | template_v1pdu->enterprise_length*sizeof(oid)); |
|---|
| r2420d0a |
r6519887 |
|
| 27 | 27 | unsigned dns_dnlen(dnscc_t *dn) { |
|---|
| 28 | 28 | register dnscc_t *d = dn; |
|---|
| 29 | | while(*d) |
|---|
| | 29 | unsigned l = 0; |
|---|
| | 30 | while(*d && l < DNS_MAXDN) { |
|---|
| | 31 | l += 1 + *d; |
|---|
| 30 | 32 | d += 1 + *d; |
|---|
| | 33 | } |
|---|
| 31 | 34 | return (unsigned)(d - dn) + 1; |
|---|
| 32 | 35 | } |
|---|
| … | … | |
| 136 | 139 | return -1; /* label too long */ |
|---|
| 137 | 140 | if ((llab[-1] = (dnsc_t)c) != 0) { |
|---|
| | 141 | if (dp >= de) |
|---|
| | 142 | return -1; |
|---|
| 138 | 143 | *dp++ = 0; |
|---|
| 139 | 144 | if (isabs) |
|---|
| r5a9b91b |
r6519887 |
|
| 56 | 56 | c = *pp++; /* length of the label */ |
|---|
| 57 | 57 | if (!c) { /* empty label: terminate */ |
|---|
| 58 | | if (dn >= de) /* can't fit terminator */ |
|---|
| | 58 | if (dp >= de) /* can't fit terminator */ |
|---|
| 59 | 59 | goto noroom; |
|---|
| 60 | 60 | *dp++ = 0; |
|---|
| rbd6d64f |
r6519887 |
|
| 125 | 125 | } |
|---|
| 126 | 126 | } |
|---|
| 127 | | assert(i <= 71); |
|---|
| | 127 | assert(i <= 70); |
|---|
| 128 | 128 | text[i++] = '\n'; |
|---|
| 129 | 129 | text[i] = 0; |
|---|