04_fix_test 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #! /bin/sh -e
  2. ## 04_fix_test.dpatch by <weasel@debian.org>
  3. ##
  4. ## All lines beginning with `## DP:' are a description of the patch.
  5. ## DP: No description.
  6. if [ $# -lt 1 ]; then
  7. echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
  8. exit 1
  9. fi
  10. [ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
  11. patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
  12. case "$1" in
  13. -patch) patch -p1 ${patch_opts} < $0;;
  14. -unpatch) patch -R -p1 ${patch_opts} < $0;;
  15. *)
  16. echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
  17. exit 1;;
  18. esac
  19. exit 0
  20. @DPATCH@
  21. diff -urNad tor-0.0.9pre4/src/or/test.c /tmp/dpep.hUQG4a/tor-0.0.9pre4/src/or/test.c
  22. --- tor-0.0.9pre4/src/or/test.c 2004-10-17 00:14:52.000000000 +0200
  23. +++ /tmp/dpep.hUQG4a/tor-0.0.9pre4/src/or/test.c 2004-10-17 19:03:33.772660687 +0200
  24. @@ -919,7 +919,8 @@
  25. test_assert(!is_legal_nickname_or_hexdigest("abcdefghijklmnopqrst"));
  26. get_platform_str(platform, sizeof(platform));
  27. -
  28. + memset(&r1,0,sizeof(r1));
  29. + memset(&r2,0,sizeof(r2));
  30. r1.address = "testaddr1.foo.bar";
  31. r1.addr = 0xc0a80001u; /* 192.168.0.1 */
  32. r1.published_on = 0;