[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-609-g864144f

Jeremy Allison jra at samba.org
Wed Apr 1 01:31:03 GMT 2009


The branch, v3-4-test has been updated
       via  864144fc82d49e228a4e1c49dfaf004ba19d1088 (commit)
       via  ee729830b872f1cb760ad91b808bf200bc34773d (commit)
      from  23876eba5f22b5953339b23bf25262d53acce994 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test


- Log -----------------------------------------------------------------
commit 864144fc82d49e228a4e1c49dfaf004ba19d1088
Merge: ee729830b872f1cb760ad91b808bf200bc34773d 23876eba5f22b5953339b23bf25262d53acce994
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Mar 31 18:30:27 2009 -0700

    Merge branch 'v3-4-test' of ssh://jra@git.samba.org/data/git/samba into v3-4-test

commit ee729830b872f1cb760ad91b808bf200bc34773d
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Mar 31 18:28:49 2009 -0700

    Tidy up some convert_string_internal error cases, found by Andrew Bartlett.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source3/lib/charcnv.c |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c
index c3b3451..03b32c1 100644
--- a/source3/lib/charcnv.c
+++ b/source3/lib/charcnv.c
@@ -242,7 +242,7 @@ static size_t convert_string_internal(charset_t from, charset_t to,
 					DEBUG(3,("convert_string_internal: Conversion error: %s(%s)\n",reason,inbuf));
 				if (allow_bad_conv)
 					goto use_as_is;
-				break;
+				return (size_t)-1;
 			case E2BIG:
 				reason="No more room"; 
 				if (!conv_silent) {
@@ -263,11 +263,12 @@ static size_t convert_string_internal(charset_t from, charset_t to,
 					DEBUG(3,("convert_string_internal: Conversion error: %s(%s)\n",reason,inbuf));
 				if (allow_bad_conv)
 					goto use_as_is;
-				break;
+				
+				return (size_t)-1;
 			default:
 				if (!conv_silent)
 					DEBUG(0,("convert_string_internal: Conversion error: %s(%s)\n",reason,inbuf));
-				break;
+				return (size_t)-1;
 		}
 		/* smb_panic(reason); */
 	}
@@ -412,7 +413,11 @@ size_t convert_string(charset_t from, charset_t to,
 #ifdef BROKEN_UNICODE_COMPOSE_CHARACTERS
 				goto general_case;
 #else
-				return retval + convert_string_internal(from, to, p, slen, q, dlen, allow_bad_conv);
+				size_t ret = convert_string_internal(from, to, p, slen, q, dlen, allow_bad_conv);
+				if (ret == (size_t)-1) {
+					return ret;
+				}
+				return retval + ret;
 #endif
 			}
 		}
@@ -448,7 +453,11 @@ size_t convert_string(charset_t from, charset_t to,
 #ifdef BROKEN_UNICODE_COMPOSE_CHARACTERS
 				goto general_case;
 #else
-				return retval + convert_string_internal(from, to, p, slen, q, dlen, allow_bad_conv);
+				size_t ret = convert_string_internal(from, to, p, slen, q, dlen, allow_bad_conv);
+				if (ret == (size_t)-1) {
+					return ret;
+				}
+				return retval + ret;
 #endif
 			}
 		}
@@ -484,7 +493,11 @@ size_t convert_string(charset_t from, charset_t to,
 #ifdef BROKEN_UNICODE_COMPOSE_CHARACTERS
 				goto general_case;
 #else
-				return retval + convert_string_internal(from, to, p, slen, q, dlen, allow_bad_conv);
+				size_t ret = convert_string_internal(from, to, p, slen, q, dlen, allow_bad_conv);
+				if (ret == (size_t)-1) {
+					return ret;
+				}
+				return retval + ret;
 #endif
 			}
 		}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list