Version in base suite: 1.2.1~git20181030.92c5462-1 Base version: libimobiledevice_1.2.1~git20181030.92c5462-1 Target version: libimobiledevice_1.2.1~git20181030.92c5462-2 Base file: /srv/ftp-master.debian.org/ftp/pool/main/libi/libimobiledevice/libimobiledevice_1.2.1~git20181030.92c5462-1.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/libi/libimobiledevice/libimobiledevice_1.2.1~git20181030.92c5462-2.dsc changelog | 7 + gbp.conf | 2 patches/0003-idevice-properly-handle-partial-SSL-writes.patch | 46 ++++++++++ patches/series | 1 4 files changed, 55 insertions(+), 1 deletion(-) diff -Nru libimobiledevice-1.2.1~git20181030.92c5462/debian/changelog libimobiledevice-1.2.1~git20181030.92c5462/debian/changelog --- libimobiledevice-1.2.1~git20181030.92c5462/debian/changelog 2019-01-08 15:24:55.000000000 +0000 +++ libimobiledevice-1.2.1~git20181030.92c5462/debian/changelog 2019-09-29 16:48:58.000000000 +0000 @@ -1,3 +1,10 @@ +libimobiledevice (1.2.1~git20181030.92c5462-2) stable; urgency=medium + + * d/patches: properly handle partial SSL writes + * d/gbp.conf: follow buster branch + + -- Yves-Alexis Perez Sun, 29 Sep 2019 18:48:58 +0200 + libimobiledevice (1.2.1~git20181030.92c5462-1) unstable; urgency=medium * New upstream snapshot diff -Nru libimobiledevice-1.2.1~git20181030.92c5462/debian/gbp.conf libimobiledevice-1.2.1~git20181030.92c5462/debian/gbp.conf --- libimobiledevice-1.2.1~git20181030.92c5462/debian/gbp.conf 2019-01-08 15:24:55.000000000 +0000 +++ libimobiledevice-1.2.1~git20181030.92c5462/debian/gbp.conf 2019-09-29 16:48:58.000000000 +0000 @@ -1,5 +1,5 @@ [DEFAULT] -debian-branch = debian/master +debian-branch = debian/buster upstream-branch = upstream/master pristine-tar = True diff -Nru libimobiledevice-1.2.1~git20181030.92c5462/debian/patches/0003-idevice-properly-handle-partial-SSL-writes.patch libimobiledevice-1.2.1~git20181030.92c5462/debian/patches/0003-idevice-properly-handle-partial-SSL-writes.patch --- libimobiledevice-1.2.1~git20181030.92c5462/debian/patches/0003-idevice-properly-handle-partial-SSL-writes.patch 1970-01-01 00:00:00.000000000 +0000 +++ libimobiledevice-1.2.1~git20181030.92c5462/debian/patches/0003-idevice-properly-handle-partial-SSL-writes.patch 2019-09-29 16:48:58.000000000 +0000 @@ -0,0 +1,46 @@ +From: Nikias Bassen +Date: Sun, 29 Sep 2019 17:10:46 +0200 +Subject: idevice: properly handle partial SSL writes + +--- + src/idevice.c | 23 +++++++++++++++-------- + 1 file changed, 15 insertions(+), 8 deletions(-) + +diff --git a/src/idevice.c b/src/idevice.c +index cb9bb5c..dd47e67 100644 +--- a/src/idevice.c ++++ b/src/idevice.c +@@ -366,18 +366,25 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_send(idevice_connection_ + } + + if (connection->ssl_data) { ++ uint32_t sent = 0; ++ while (sent < len) { + #ifdef HAVE_OPENSSL +- int sent = SSL_write(connection->ssl_data->session, (const void*)data, (int)len); +- debug_info("SSL_write %d, sent %d", len, sent); ++ int s = SSL_write(connection->ssl_data->session, (const void*)(data+sent), (int)(len-sent)); + #else +- ssize_t sent = gnutls_record_send(connection->ssl_data->session, (void*)data, (size_t)len); ++ ssize_t s = gnutls_record_send(connection->ssl_data->session, (void*)(data+sent), (size_t)(len-sent)); + #endif +- if ((uint32_t)sent == (uint32_t)len) { +- *sent_bytes = sent; +- return IDEVICE_E_SUCCESS; ++ if (s < 0) { ++ break; ++ } ++ sent += s; + } +- *sent_bytes = 0; +- return IDEVICE_E_SSL_ERROR; ++ debug_info("SSL_write %d, sent %d", len, sent); ++ if (sent < len) { ++ *sent_bytes = 0; ++ return IDEVICE_E_SSL_ERROR; ++ } ++ *sent_bytes = sent; ++ return IDEVICE_E_SUCCESS; + } + return internal_connection_send(connection, data, len, sent_bytes); + } diff -Nru libimobiledevice-1.2.1~git20181030.92c5462/debian/patches/series libimobiledevice-1.2.1~git20181030.92c5462/debian/patches/series --- libimobiledevice-1.2.1~git20181030.92c5462/debian/patches/series 2019-01-08 15:24:55.000000000 +0000 +++ libimobiledevice-1.2.1~git20181030.92c5462/debian/patches/series 2019-09-29 16:48:58.000000000 +0000 @@ -1,2 +1,3 @@ 0001-Drop-obsolete-m4-macros.patch 0002-Use-_LIBS-instead-of-_LDFLAGS-for-cython-link.patch +0003-idevice-properly-handle-partial-SSL-writes.patch