Commit Graph

21951 Commits

Author SHA1 Message Date
Jonathan Rose
78e9a8e5f0 Fix some stuff involving calls to memcpy and memset
The important parts of the patch were already applied through other updates.

(closes issue ASTERISK-19445)
Reported by: Makoto Dei
Patches:
	memset-memcpy-length.patch uploaded by Makoto Dei (license 5027)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@361210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-04 19:52:05 +00:00
Jonathan Rose
04756101e0 Make 'help devstate change' display properly (get rid of excess comma)
(closes issue ASTERISK-19444)
Reported by: Makoto Dei
Patches:
	devstate-change-usage-truncate.patch uploaded by Makoto Dei (license 5027)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@361201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-04 19:18:31 +00:00
Jonathan Rose
ed76cdda72 Replace GNU old-style field designator extensions to fix clang warnings
(issue ASTERISK-19540)
Reported by: Makoto Dei
Patches:
	clang-gnu-designator.patch uploaded by Makoto Dei (license 5027)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@361142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-04 16:29:18 +00:00
Jonathan Rose
abd7fa4476 Make the MeetMeAdmin N command (mute all nonadmins) not mute admins
(Closes Issue ASTERISK-19335)
Reported by: Johan Wilfer
Review: https://reviewboard.asterisk.org/r/1843/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@361090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-04 13:26:45 +00:00
Kinsey Moore
b1152d145f Fix the display of documentation for Transfer
This came up while fixing documentation generation for many other cases where
the argument separator was not being displayed properly.  Now that it is
displayed properly, it shows up in the wrong place for Transfer since the '/'
is only required if Tech is present.

(related to issue ASTERISK-18168)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@361040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-03 20:08:10 +00:00
Kinsey Moore
063aa93c46 Stop sending out RTCP if RTP is inactive
This change prevents Asterisk from sending RTCP receiver reports during a
remote bridge since it is no longer receiving media and should not be
reporting anything.

(related to ASTERISK-19366)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-02 22:18:17 +00:00
Richard Mudgett
1df90a2cf1 Fix logger deadlock on Asterisk shutdown.
The logger_thread() had an exit path that failed to release the logmsgs
list lock.

* Make logger_thread() exit path unlock the logmsgs list lock.

* Made ast_log() not queue any messages to the logmsgs list if the
close_logger_thread flag is set.

(issue ASTERISK-19463)
Reported by: Matt Jordan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-30 21:26:47 +00:00
Mark Michelson
82fbd4a401 Fix potential race condition during call pickup.
Prior to this patch, a connected line update was queued during
call pickup and then an answer frame was queued. The original
caller would presumably then have his connected line updated
and then the call would be answered.

In actuality, the answer frame was not how the call ended up
being answered. Rather, an odd section in app_dial that checks
if the called channel's state is up.

The result is that the order of the connected line update and
the answer were variable. In most cases, this wasn't actually
a bad thing. However, if the 'I' option was passed to dial, the
connected line update would be inhibited.

The fix is to queued the connected line after the answer frame is
queued. This way the race in app_dial is between two
conditions resulting in an answer. This way the connected line
update occurs after the answer every time.

(closes issue ASTERISK-19183)
Reported by: Thomas Arimont
Tested by: Thomas Arimont
    Mark Michelson
Patches:
    ASTERISK-19183.patch uploaded by Mark Michelson (license 5049)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360884 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-29 23:32:35 +00:00
Mark Michelson
58565827e6 Improve accuracy of identifying information sent in dialog-info SIP NOTIFY requests.
This change makes use of connected party information in addition to caller ID in order
to populate local and remote XML elements in the dialog-info NOTIFYs.

(closes issue ASTERISK-16735)
Reported by: Maciej Krajewski
Tested by: Maciej Krajewski
Patches:
    local_remote_hint2.diff uploaded by Mark Michelson (license 5049)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-29 23:04:05 +00:00
Terry Wilson
d58fe85724 Destroy configs when they are no longer used
https://reviewboard.asterisk.org/r/1834/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-28 19:06:03 +00:00
Mark Michelson
390e8c1f73 Make a debug message regarding subscription changes more accurate.
I was getting confused during some testing why Asterisk was saying that
a subscription was being added when it was clearly being removed. This
fixes that confusion.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-27 16:59:34 +00:00
Jonathan Rose
fe267f5925 Updates config with bootstrap where I changed configure.ac in r360488
(issue ASTERISK-17842)
Reported by: Bryon Clark


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-27 14:32:40 +00:00
Jonathan Rose
aa74e83c19 Fix BETTER_BACKTRACES library detection for Fedora/RedHat/CentOS
(closes ASTERISK-17842)
Reported by: Bryon Clark
Patches:
	20110512__issue19278.diff.txt uploaded by Tilghman Lesher (license 5003)
	configure_bfd_with_dl_and_iberty.patch uploaded by Bryon Clark (license 6157)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-26 19:35:31 +00:00
Paul Belanger
165789485e Update CHANGES for r360471
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-26 18:37:59 +00:00
Paul Belanger
bcf902419e Fix Asterisk version typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-26 18:32:54 +00:00
Paul Belanger
df02086396 Increase verbosity level for ast_verb messages
While this does not fix the issue of the CLI being flooded by 'doing
dnsmgr_lookup' messages, increasing the verbosity level above 5 should help
minimize it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-26 18:25:45 +00:00
Russell Bryant
e068e29190 func_curl: Fix leak of an ast_str in error handling code path.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-24 23:46:16 +00:00
Russell Bryant
dea36a06bb app_page: Fix a memory leak on every Page().
dial_list is a dynamically allocated array that is allocated at the beginning
of Page() based on how many devices will be dialed.  This was never being freed.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-24 03:07:48 +00:00
Russell Bryant
093121050f app_jack: fix datastore memory leak in error handling path.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-24 03:01:20 +00:00
Russell Bryant
2b2c5f27fc Rebuild parsers.
This is needed to include the last fix to main/ast_expr2.y.  The changes look
much bigger as this regeneration of the code was done with newer versions of
flex and bison.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-24 02:34:39 +00:00
Russell Bryant
17cd5abb22 expression parser: Fix (theoretical) memory leak.
Fix a memory leak that is very unlikely to actually happen.  If a malloc()
succeeded, but the following strdup() failed, the memory from the original
malloc() would be leaked.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-24 02:33:36 +00:00
Richard Mudgett
c04afdbc70 Make number not available presentation also set screening to network provided.
Q.951 indicates that when the presentation indicator is "Number not
available due to interworking" for a number then the screening indicator
field should be "Network provided".

* Made ast_party_id_presentation() return AST_PRES_NUMBER_NOT_AVAILABLE
when the presentation is "Number not available due to interworking".  This
fix makes Asterisk consistent and it also makes it consistent with earlier
branches as far as this presentation value is concerned.

* Made pri_to_ast_presentation() and ast_to_pri_presentation() conversions
handle the "Number not available due to interworking" case better in
sig_pri.c.  This change is possible because the minimum required libpri
version (v1.4.11) has the necessary defines in libpri.h.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-24 00:35:25 +00:00
Richard Mudgett
f9246f83c9 Add missing initialization of update_redirecting in chan_sip.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-23 22:47:05 +00:00
Jonathan Rose
94b6251ea2 Update install_prereq script to include missing GSM library for debian amd move SQLite3.
(closes issue ASTERISK-19367)
Reported by: Andrew Latham
Patches:
	debian_install_prereq.diff uploaded by Andrew Latham (license 5985)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-21 14:51:14 +00:00
Tzafrir Cohen
00dc354511 Also detect gmime 2.6
Also detect gmime version 2.6 (Michael Biebl)

Signed-off-by: Tzafrir Cohen (License #5035) <tzafrir.cohen@xorcom.com>

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-21 13:19:41 +00:00
Matthew Jordan
cfdc12387b Ensure Asterisk sends a BYE when pending on the final response to a re-INVITE
When Asterisk detects a hangup and cannot send a BYE due to a pending
INVITE, it sets the pendingbye flag and waits for the final response to that
INVITE.  When the response is received, it transmits the BYE.  If, however,
that INVITE request is a pending re-INVITE, it needs to first send a CANCEL
request to terminate the pending re-INVITE.  In that circumstance, Asterisk
was, in some scenarios, clearing the pendingbye flag after processing the
CANCEL request and not checking for a pending BYE when receiving the final
487 response to the INVITE.

This patch ensures that if the pendingbye flag is set, it is honored
regardless of the nature of the INVITE request currently in flight.

(closes issue ASTERISK-19365)
Reported by: Thomas Arimont
Tested by: Thomas Arimont
Patches:
  bugASTERISK-19365_2012_03_08.patch uploaded by mjordan (license 6283)

Review: https://reviewboard.asterisk.org/r/1807



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-21 13:19:21 +00:00
Kinsey Moore
a25e2ad59c Prevent Echo() from relaying control, null, and modem frames
Echo()'s description states that it echoes audio, video, and DTMF except for #
while it actually echoes any frame that it receives other than DTMF #.  This
was causing frame storms in the test suite in some circumstances where Echo()
was attached to both ends of a pair of local channels and control frames
were being periodically generated.  Echo()'s behavior and description have
been modifed so that it only echoes media and non-# DTMF frames.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-20 20:32:55 +00:00
Richard Mudgett
8dc6345d0f Allow AMI action callback to be reentrant.
Fix AMI module reload deadlock regression from ASTERISK-18479 when it
tried to fix the race between calling an AMI action callback and
unregistering that action.  Refixes ASTERISK-13784 broken by
ASTERISK-17785 change.

Locking the ao2 object guaranteed that there were no active callbacks that
mattered when ast_manager_unregister() was called.  Unfortunately, this
causes the deadlock situation.  The patch stops locking the ao2 object to
allow multiple threads to invoke the callback re-entrantly.  There is no
way to guarantee a module unload will not crash because of an active
callback.  The code attempts to minimize the chance with the registered
flag and the maximum 5 second delay before ast_manager_unregister()
returns.

The trunk version of the patch changes the API to fix the race condition
correctly to prevent the module code from unloading from memory while an
action callback is active.

* Don't hold the lock while calling the AMI action callback.

(closes issue ASTERISK-19487)
Reported by: Philippe Lindheimer

Review: https://reviewboard.asterisk.org/r/1818/
Review: https://reviewboard.asterisk.org/r/1820/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-20 17:21:16 +00:00
Jonathan Rose
698cd736b6 Prevent chanspy from binding to zombie channels
This patch addresses a bug with chanspy on local channels which roughly 50% of the time
would create a situation where chanspy can latch onto a zombie channel, keeping the zombie
alive forever and causing the channel doing the spying to never be able to hang up.

(closes issue ASTERISK-19493)
Reported by: lvl
Review: https://reviewboard.asterisk.org/r/1819/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359892 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-16 20:13:56 +00:00
Alec L Davis
1ded276c97 Missed lastinvite CSeq int to uint32_t change
from Review: https://reviewboard.asterisk.org/r/1699/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-16 08:22:09 +00:00
Matthew Jordan
4666efb849 Fix remotely exploitable stack overflow in HTTP manager
There exists a remotely exploitable stack buffer overflow in HTTP digest
authentication handling in Asterisk.  The particular method in question
is only utilized by HTTP AMI.  When parsing the digest information, the
length of the string is not checked when it is copied into temporary buffers
allocated on the stack.

This patch fixes this behavior by parsing out pre-defined key/value pairs
and avoiding unnecessary copies to the stack.

(closes issue ASTERISK-19542)
Reported by: Russell Bryant
Tested by: Matt Jordan



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-15 19:01:22 +00:00
Matthew Jordan
2073ca37b6 Fix remotely exploitable stack overrun in Milliwatt
Milliwatt is vulnerable to a remotely exploitable stack overrun when using
the 'o' option.  This occurs due to the milliwatt_generate function not
accounting for AST_FRIENDLY_OFFSET when calculating the maximum number of
samples it can put in the output buffer.

This patch resolves this issue by taking into account AST_FRIENDLY_OFFSET
when determining the maximum number of samples allowed.  Note that at no
point is remote code execution possible.  The data that is written into the
buffer is the pre-defined Milliwatt data, and not custom data.

(closes issue ASTERISK-19541)
Reported by: Russell Bryant
Tested by: Matt Jordan
Patches:
  milliwatt_stack_overrun.rev1.txt by Russell Bryant (license 6283)
  Note that this patch was written by Russell, even though Matt uploaded it
........

Merged revisions 359645 from http://svn.asterisk.org/svn/asterisk/branches/1.6.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-15 18:35:59 +00:00
Richard Mudgett
e446657808 Add missing connected line macro calls to initial dial for Dial and Queue apps.
The connected line interception macros do not get executed when the
outgoing channel is initially created and that channel's caller-id is
implicitly imported into the incoming channel's connected line data.  If
you are using the interception macros, you would expect that they get run
for every change to a channel's connected line information outside of
normal dialplan execution.

Review: https://reviewboard.asterisk.org/r/1817/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-15 18:17:30 +00:00
Russell Bryant
167dd53f80 chan_iax2: Fix use of uninitialized sockaddr_in in try_transfer().
Initialize a struct sockaddr_in in try_transfer() so that the code isn't
(potentially) trying to read from it while uninitialized.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-15 00:52:17 +00:00
Russell Bryant
ba3230cc45 chan_gtalk: Fix use of uninitialized vars in config handling.
Fix potential use of context, parkinglot, and prefs before they are
initialized.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-15 00:25:20 +00:00
Russell Bryant
e470c22ed6 chan_gtalk: Fix potential use of uninitialized variable.
Avoid potential use of idroster in gtalk_alloc() before it has been
initialized.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14 23:43:38 +00:00
Russell Bryant
3627d4c840 app_chanisavail: Fix use of uninitialized variable.
Ensure that status is set before it is used by resetting it during each loop
iteration.  This could have resulted in incorrect results from this app.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14 23:26:59 +00:00
Russell Bryant
d9c2ea6d15 udptl: Ensure fec[] in udptl_build_packet() is initialized.
Scan results indicated that this array could be used uninitialized.  At a quick
look, it looks correct.  In any case, initializing it is a Good Thing (tm).


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14 23:00:19 +00:00
Russell Bryant
d500229f3c app.h: Always initialize AST_DECLARE_APP_ARGS().
This patch ensures that the struct defined by AST_DECLARE_APP_ARGS() is always
fully initialized.  I'm not sure if this fixes any real bugs, but it silences
a bunch of warnings from coverity, and is generally a good thing to do anyway.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14 22:26:28 +00:00
Richard Mudgett
5b61050209 Fix deadlock potential with some ast_indicate/ast_indicate_data calls.
Calling ast_indicate()/ast_indicate_data() with the channel lock held can
result in a deadlock with a local channel because of how local channels
need to avoid deadlock.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14 22:20:24 +00:00
Matthew Jordan
6625f0a50c Fix incorrect jitter buffer overflow due to missed resynchronizations
When a change in time occurs, such that the timestamps associated with frames
being placed into an adaptive jitter buffer (implemented in jitterbuf.c)
are significantly different then the previously inserted frames, the jitter
buffer checks to see if it needs to be resynched to the new time frame.  If
three consecutive packets break the threshold, the jitter buffer resynchs
itself to the new timestamps.  This currently only occurs when history is
calculated, and hence only on JB_TYPE_VOICE frames.

JB_TYPE_CONTROL frames, on the other hand, are never passed to the history
calculations.  Because of this, if the jump in time is greater then the
maximum allowed length of the jitter buffer, the JB_TYPE_CONTROL frames are
dropped and no resynchronization occurs.  Alterntively, if the overfill
logic is not triggered, the JB_TYPE_CONTROL frame will be placed into the
buffer, but with a time reference that is not applicable.  Subsequent
JB_TYPE_VOICE frames will quickly trigger the overflow logic until reads
from the jitter buffer reach the errant JB_TYPE_CONTROL frame.

This patch allows JB_TYPE_CONTROL frames to resynch the jitter buffer.  As
JB_TYPE_CONTROL frames are unlikely to occur in multiples, it perform the
resynchronization on any JB_TYPE_CONTROL frame that breaks the resynch
threshold.

Note that this only impacts chan_iax2, as other consumers of the adaptive
jitter buffer use the abstract jitter buffer API, which does not use
JB_TYPE_CONTROL frames.

Review: https://reviewboard.asterisk.org/r/1814/

(closes issue ASTERISK-18964)
Reported by: Kris Shaw
Tested by: Kris Shaw, Matt Jordan
Patches:
  jitterbuffer-2012-2-26.diff uploaded by Kris Shaw (license 5722)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14 17:32:02 +00:00
Richard Mudgett
7141a29e1b Fix Dial m and r options and forked calls generating warnings for voice frames.
When connected line support was added, the wait_for_answer() variable
single changed its meaning slightly.  Unfortunately, the places where
single was used did not necessarily get updated to reflect that change.
Also audio/video frames were sent to all forked calls when the endpoints
were never made compatible.

* Don't pass audio/video media frames when the channels have not been made
compatible.

* Added handling of AST_CONTROL_SRCCHANGE to app_dial.c.

* Fixed app_dial.c passing on AST_CONTROL_HOLD because that frame can also
pass a requested MOH class.

(closes issue ASTERISK-16901)
Reported by: Chris Gentle

(closes issue ASTERISK-17541)
Reported by: clint

Review: https://reviewboard.asterisk.org/r/1805/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14 17:17:03 +00:00
Russell Bryant
5a87fa5de9 Fix bogus reads/writes of console log levels in asterisk.c
This patch updates the NUMLOGLEVELS define in logger.h to 32, to match the fact
that logger.c implements 32 log levels (because of the custom log level stuff).
asterisk.c uses this define to size an array of levels per remote console.

This array is modified in ast_console_toggle_loglevel(), which is called by the
"logger set level" CLI command.  While the documentation for the CLI command
doesn't make it terribly obvious, you can use this CLI command to toggle a
custom log level on a remote console, as well.  However, doing so led to an
invalid array index in asterisk.c.

This array is read from any time a log message is written to a console.  So, 
all custom log level messages resulted in a bogus read if a remote console
was connected.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14 10:52:45 +00:00
Russell Bryant
08e1d392f4 Fix invalid reads/writes due to incorrect sizeof().
These few places in the code used sizeof() on h_addr in struct hostent.
This is sizeof(char *).  The correct way to get the size of this address is to
use h_length.  This error would result in reads/writes of 8 bytes instead of 4
on 64-bit machines.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14 10:03:07 +00:00
Russell Bryant
a66d14f2ae Fix inaccurate sizeof() in sched.c.
This code just needed sizeof(int), not sizeof(int *).


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14 01:32:28 +00:00
Russell Bryant
a12e5aab1a Fix incorrect sizeof() in astman.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359116 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14 00:43:15 +00:00
Russell Bryant
7bff9be851 Fix incorrect usage of sizeof() in res_crypto.
In this case, just remove the memset().  There was a redundant memset that is
done correctly just 2 lines later.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14 00:37:17 +00:00
Russell Bryant
30d3e59447 Fix broken usage of sizeof() in res_adsi.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14 00:27:31 +00:00
Russell Bryant
48b1c5e5a6 Fix incorrect sizeof() usage in features.c.
This didn't actually result in a bug anywhere, luckily.  The only place
where the result of these memcpys was used is in app_dial, and the only
field that it read out of ast_call_feature was the first one, which is an
int, so these memcpys always copied just enough to avoid a problem.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14 00:20:21 +00:00
Russell Bryant
c8f8fcc518 Fix incorrect sizeof() on a pointer in MD5Final().
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14 00:08:54 +00:00