debian/canfestival-objdictedit.postinst
author fbeaulier
Mon, 29 Aug 2011 17:44:49 +0200
changeset 666 9febdd6fdc71
parent 531 f912f8d26e98
permissions -rw-r--r--
patch from Stefan Kratochwil <entwicklung@inovel.de> : canfestival-3-fm3_698.patch
Bug:
If an object dictionary entry was requested whose size exceeds
SDO_MAX_LENGTH_TRANSFERT, the memcpy() call at line 139 of objacces.c overwrites
the memory after *pDestData which causes stack corruption.
-> Bugfix:
The bug was corrected by size checking the requested data. An 'Out of
memory' error message will be generated if the requested data exceeds
SDO_MAX_LENGTH_TRANSFERT.

Additional changes:
Added dynamic buffer allocation for the SDO transfer. This feature can be used
if SDO_DYNAMIC_BUFFER_ALLOCATION is defined in config.h. The size of the
dynamically allocated buffer is controlled with
SDO_DYNAMIC_BUFFER_ALLOCATION_SIZE.
-> Note:
This change removes the detection of OD_LENGTH_DATA_INVALID errors!
346
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
     1
#!/bin/sh
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
     2
# postinst script for canfestival
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
     3
#
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
     4
# see: dh_installdeb(1)
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
     5
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
     6
set -e
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
     7
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
     8
# summary of how this script can be called:
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
     9
#        * <postinst> `configure' <most-recently-configured-version>
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    10
#        * <old-postinst> `abort-upgrade' <new version>
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    11
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    12
#          <new-version>
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    13
#        * <postinst> `abort-remove'
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    14
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    15
#          <failed-install-package> <version> `removing'
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    16
#          <conflicting-package> <version>
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    17
# for details, see http://www.debian.org/doc/debian-policy/ or
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    18
# the debian-policy package
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    19
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    20
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    21
case "$1" in
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    22
    configure)
531
f912f8d26e98 updated : debian package scripts
greg
parents: 346
diff changeset
    23
	ln -sf /usr/share/CanFestival-3/objdictgen/objdictedit.py /usr/bin/objdictedit 
346
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    24
	ln -sf /usr/share/objdictgen/objdictedit.py /usr/bin/objdictgen
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    25
	;;
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    26
	
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    27
    abort-upgrade|abort-remove|abort-deconfigure)
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    28
    ;;
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    29
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    30
    *)
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    31
        echo "postinst called with unknown argument \`$1'" >&2
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    32
        exit 1
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    33
    ;;
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    34
esac
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    35
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    36
# dh_installdeb will replace this with shell code automatically
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    37
# generated by other debhelper scripts.
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    38
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    39
#DEBHELPER#
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    40
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    41
exit 0
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    42
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    43