7c656d0
diff --git a/src/md5.c b/src/md5.c
7c656d0
index a22f6d2..fc5693f 100644
7c656d0
--- a/src/md5.c
7c656d0
+++ b/src/md5.c
7c656d0
@@ -296,6 +296,7 @@ static void DigestToBase16(unsigned char *digest, char *zBuf){
7c656d0
 static int md5_cmd(void*cd, Tcl_Interp *interp, int argc, const char **argv){
7c656d0
   MD5Context ctx;
7c656d0
   unsigned char digest[16];
7c656d0
+  char buf[64];
7c656d0
 
7c656d0
   if( argc!=2 ){
7c656d0
     Tcl_AppendResult(interp,"wrong # args: should be \"", argv[0], 
7c656d0
@@ -305,7 +306,8 @@ static int md5_cmd(void*cd, Tcl_Interp *interp, int argc, const char **argv){
7c656d0
   MD5Init(&ctx;;
7c656d0
   MD5Update(&ctx, (unsigned char*)argv[1], (unsigned)strlen(argv[1]));
7c656d0
   MD5Final(digest, &ctx;;
7c656d0
-  DigestToBase16(digest, interp->result);
7c656d0
+  DigestToBase16(digest, buf);
7c656d0
+  Tcl_SetResult(interp, buf, TCL_VOLATILE);
7c656d0
   return TCL_OK;
7c656d0
 }
7c656d0
 
7c656d0
@@ -318,6 +320,7 @@ static int md5file_cmd(void*cd, Tcl_Interp*interp, int argc, const char **argv){
7c656d0
   MD5Context ctx;
7c656d0
   unsigned char digest[16];
7c656d0
   char zBuf[10240];
7c656d0
+  char buf[64];
7c656d0
 
7c656d0
   if( argc!=2 ){
7c656d0
     Tcl_AppendResult(interp,"wrong # args: should be \"", argv[0], 
7c656d0
@@ -339,7 +342,8 @@ static int md5file_cmd(void*cd, Tcl_Interp*interp, int argc, const char **argv){
7c656d0
   }
7c656d0
   fclose(in);
7c656d0
   MD5Final(digest, &ctx;;
7c656d0
-  DigestToBase16(digest, interp->result);
7c656d0
+  DigestToBase16(digest, buf);
7c656d0
+  Tcl_SetResult(interp, buf, TCL_VOLATILE);
7c656d0
   return TCL_OK;
7c656d0
 }
7c656d0
 
7c656d0
diff --git a/src/tclsqlite.c b/src/tclsqlite.c
7c656d0
index cc8daa1..7337ed7 100644
7c656d0
--- a/src/tclsqlite.c
7c656d0
+++ b/src/tclsqlite.c
7c656d0
@@ -1246,7 +1246,7 @@ int TCLSH_MAIN(int argc, char **argv){
7c656d0
     }
7c656d0
     if( Tcl_EvalFile(interp, argv[1])!=TCL_OK ){
7c656d0
       const char *zInfo = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY);
7c656d0
-      if( zInfo==0 ) zInfo = interp->result;
7c656d0
+      if( zInfo==0 ) zInfo = Tcl_GetStringResult(interp);
7c656d0
       fprintf(stderr,"%s: %s\n", *argv, zInfo);
7c656d0
       return TCL_ERROR;
7c656d0
     }