Index: build/assemble-source-from-google.sh ================================================================== --- build/assemble-source-from-google.sh +++ build/assemble-source-from-google.sh @@ -17,19 +17,31 @@ # Build the libpcsc we need function assemblePCSC() { local version url pkg sha256 local archive workdir + local patchfile pkg='google-chrome-smart-card-apps' version='20160317' sha256='a144a81be9fe72eb7698a7dc0c1aba6425220551cca432ba7e58984422a7cf46' archive="archive/${pkg}-${version}-nobinaries.zip" workdir="workdir-${RANDOM}${RANDOM}${RANDOM}${RANDOM}.build" + patchdir="patches" extract "${archive}" "${workdir}" || return 1 + + for patchfile in "${patchdir}"/*.diff; do + if [ ! -f "${patchfile}" ]; then + continue + fi + ( + cd "${workdir}" || exit 1 + patch -p1 --batch + ) < "${patchfile}" + done ( cd "${workdir}" || exit 1 # Copy out PC/SC headers for later use ADDED patches/google-chrome-smart-card-apps-20160317-nobinaries-fixderef.diff Index: patches/google-chrome-smart-card-apps-20160317-nobinaries-fixderef.diff ================================================================== --- /dev/null +++ patches/google-chrome-smart-card-apps-20160317-nobinaries-fixderef.diff @@ -0,0 +1,12 @@ +diff -uNr google-chrome-smart-card-apps-20160317-nobinaries.orig/common/js/src/messaging/port-message-channel.js google-chrome-smart-card-apps-20160317-nobinaries-fixderef/common/js/src/messaging/port-message-channel.js +--- google-chrome-smart-card-apps-20160317-nobinaries.orig/common/js/src/messaging/port-message-channel.js 2016-03-11 09:26:42.000000000 -0600 ++++ google-chrome-smart-card-apps-20160317-nobinaries-fixderef/common/js/src/messaging/port-message-channel.js 2019-01-30 11:13:15.451487478 -0600 +@@ -127,6 +127,8 @@ + if (!goog.object.containsKey(port, 'sender')) + return null; + var sender = port['sender']; ++ if (!goog.isDef(sender)) ++ return null; + GSC.Logging.checkWithLogger(this.logger, goog.isObject(sender)); + if (!goog.object.containsKey(sender, 'id')) + return null;