File: 0001-Do-not-error-out-when-an-application-is-run-against-.patch

package info (click to toggle)
libotr 4.1.1-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,152 kB
  • sloc: sh: 22,154; ansic: 11,886; makefile: 129
file content (40 lines) | stat: -rw-r--r-- 1,620 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From: intrigeri <intrigeri@boum.org>
Date: Sat, 1 Nov 2014 17:20:52 +0000
Bug-Debian: https://bugs.debian.org/767230
Forwarded: not-needed
Subject: Do not error out when an application is run against an older libotr
 than the one it was built against (Closes: #767230).

For Jessie, given libotr 4.1 is API- and ABI-compatible with libotr 4.0, let's
prevent this runtime check from breaking packages that were built against 4.0.

Besides, we'll be using a symbols files to deal with that soon (see #767652),
and once this happens we can't keep the runtime check, as it would break
reverse-dependencies in some cases when they can effectively run with the newer
version of libotr.

---
 src/proto.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/src/proto.c b/src/proto.c
index f560a82..922fb9a 100644
--- a/src/proto.c
+++ b/src/proto.c
@@ -54,16 +54,6 @@ gcry_error_t otrl_init(unsigned int ver_major, unsigned int ver_minor,
 {
     unsigned int api_version;
 
-    /* The major versions have to match, and you can't be using a newer
-     * minor version than we expect. */
-    if (ver_major != OTRL_VERSION_MAJOR || ver_minor > OTRL_VERSION_MINOR) {
-	fprintf(stderr, "Expected libotr API version %u.%u.%u incompatible "
-		"with actual version %u.%u.%u.  Aborting.\n",
-		ver_major, ver_minor, ver_sub,
-		OTRL_VERSION_MAJOR, OTRL_VERSION_MINOR, OTRL_VERSION_SUB);
-	return gcry_error(GPG_ERR_INV_VALUE);
-    }
-
     /* Set the API version.  If we get called multiple times for some
      * reason, take the smallest value. */
     api_version = (ver_major << 16) | (ver_minor << 8) | (ver_sub);