Skip to content

Commit aec8542

Browse files
committed
Further fixes
1 parent 1c57c5e commit aec8542

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/symbols.lisp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,18 @@
7575
(intern symbol-string new-package-string)
7676
(signal-missing-package symbol-string package-string)))))
7777

78+
(declaim (inline ensure-string))
79+
(defun ensure-string (maybe-string)
80+
(if (stringp maybe-string)
81+
maybe-string
82+
(progn (unexpected-data "string" maybe-string) "")))
83+
7884
(declaim (inline restore-symbol))
7985
(defun restore-symbol (storage restore-object)
8086
"Do not call me directly because if you called store-symbol you may have
8187
ended up writing a reference to the symbol object instead of the symbol object."
8288
(let* ((symbol-string (restore-string storage))
83-
(package-string (funcall (the function restore-object))) ;; might be a reference
89+
(package-string (ensure-string (funcall (the function restore-object)))) ;; might be a reference
8490
(package (find-package package-string)))
8591
(if package
8692
(values (intern symbol-string package))

test/cl-binary-store-tests.lisp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,6 @@
672672
(invalid-input-data ())))
673673
(delete-file "fuzzing-input")))
674674
(when (probe-file "fuzzing-input")
675-
(format t "Trying pre-existing fuzzing-input~%")
676675
(finish-output t)
677676
(try
678677
(with-open-file (str "fuzzing-input" :element-type '(unsigned-byte 8)

0 commit comments

Comments
 (0)