FreeBSD Bugzilla – Attachment 195812 Details for
Bug 227861
math/sc-im: segmentation fault upon :wq
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
sc-im-0.7.0.diff
sc-im-0.7.0.diff (text/plain), 3.07 KB, created by
Samy Mahmoudi
on 2018-08-03 08:22:31 UTC
(
hide
)
Description:
sc-im-0.7.0.diff
Filename:
MIME Type:
Creator:
Samy Mahmoudi
Created:
2018-08-03 08:22:31 UTC
Size:
3.07 KB
patch
obsolete
>Index: files/patch-cmds__command.c >=================================================================== >--- files/patch-cmds__command.c (nonexistent) >+++ files/patch-cmds__command.c (copie de travail) >@@ -0,0 +1,11 @@ >+--- cmds_command.c.orig 2018-08-03 06:04:39 UTC >++++ cmds_command.c >+@@ -826,7 +826,7 @@ void do_commandmode(struct block * sb) { >+ exec_cmd(line); >+ >+ } else if ( inputline[0] == L'w' ) { >+- if (savefile() == 0 && ! wcscmp(inputline, L"wq")) shall_quit = 1; >++ if (savefile() == 0 && ! wcsncmp(inputline, L"wq", 2)) shall_quit = 1; >+ >+ } else if ( ! wcsncmp(inputline, L"file ", 5) ) { >+ > >Property changes on: files/patch-cmds__command.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-doc >=================================================================== >--- files/patch-doc (nonexistent) >+++ files/patch-doc (copie de travail) >@@ -0,0 +1,11 @@ >+--- doc.orig 2018-08-03 06:09:42 UTC >++++ doc >+@@ -328,6 +328,8 @@ Commands for handling cell content: >+ :w {file} Save the current spreadsheet as {file}. >+ :w! {file} Save the current spreadsheet as {file}, forcing an overwrite >+ if {file} already exists. >++ :wq Save the current spreadsheet and quit SC-IM. >++ :wq {file} Save the current spreadsheet as {file} and quit SC-IM. >+ >+ :h Show this help. >+ :help Show this help. > >Property changes on: files/patch-doc >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-file.c >=================================================================== >--- files/patch-file.c (nonexistent) >+++ files/patch-file.c (copie de travail) >@@ -0,0 +1,16 @@ >+--- file.c.orig 2017-12-13 17:48:59 UTC >++++ file.c >+@@ -202,7 +202,12 @@ int savefile() { >+ del_range_chars(name, 0, 1 + force_rewrite); >+ wordexp(name, &p, 0); >+ >+- if (! force_rewrite && p.we_wordv[0] && file_exists(p.we_wordv[0])) { >++ if (wcslen(inputline) > 2 && (!p.we_wordv || !p.we_wordv[0])) { >++ sc_error("Trailing space(s)"); >++ return -1; >++ } >++ >++ if (! force_rewrite && p.we_wordv && p.we_wordv[0] && file_exists(p.we_wordv[0])) { >+ sc_error("File already exists. Use \"!\" to force rewrite."); >+ wordfree(&p); >+ return -1; > >Property changes on: files/patch-file.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 227861
:
195812
|
195813