* #36737: switch back to svn repo, remove assert in sip_transaction.c
diff --git a/jni/pjproject-android/pjlib/src/pj/log.c b/jni/pjproject-android/pjlib/src/pj/log.c
index 47b6b0f..fef4317 100644
--- a/jni/pjproject-android/pjlib/src/pj/log.c
+++ b/jni/pjproject-android/pjlib/src/pj/log.c
@@ -1,4 +1,4 @@
-/* $Id$ */
+/* $Id: log.c 4624 2013-10-21 06:37:30Z ming $ */
 /* 
  * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
@@ -107,7 +107,7 @@
     pj_thread_local_set(thread_indent_tls_id, (void*)(pj_ssize_t)indent);
 }
 
-static int log_get_raw_indent()
+static int log_get_raw_indent(void)
 {
     return (long)(pj_ssize_t)pj_thread_local_get(thread_indent_tls_id);
 }
@@ -119,13 +119,13 @@
     if (log_indent < 0) log_indent = 0;
 }
 
-static int log_get_raw_indent()
+static int log_get_raw_indent(void)
 {
     return log_indent;
 }
 #endif	/* PJ_LOG_ENABLE_INDENT && PJ_HAS_THREADS */
 
-static int log_get_indent()
+static int log_get_indent(void)
 {
     int indent = log_get_raw_indent();
     return indent > LOG_MAX_INDENT ? LOG_MAX_INDENT : indent;
@@ -445,6 +445,9 @@
 	print_len = pj_ansi_snprintf(pre, sizeof(log_buffer)-len, 
 				     "<logging error: msg too long>");
     }
+    if (print_len < 1 || print_len >= (int)(sizeof(log_buffer)-len)) {
+	print_len = sizeof(log_buffer) - len - 1;
+    }
     len = len + print_len;
     if (len > 0 && len < (int)sizeof(log_buffer)-2) {
 	if (log_decor & PJ_LOG_HAS_CR) {