Patch Name: PHCO_27057 Patch Description: s700_800 11.11 vi(1) cumulative patch Creation Date: 02/05/21 Post Date: 02/05/30 Hardware Platforms - OS Releases: s700: 11.11 s800: 11.11 Products: N/A Filesets: TextEditors.EDIT-ENG-A-MAN,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP TextEditors.EDITORS,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP Automatic Reboot?: No Status: General Release Critical: No (superseded patches were critical) PHCO_25987: ABORT CORRUPTION Category Tags: defect_repair enhancement general_release critical halts_system corruption Path Name: /hp-ux_patches/s700_800/11.X/PHCO_27057 Symptoms: PHCO_27057: ( SR:8606228872 CR:JAGad97925 ) vi(1) cannot handle files, with lines having more than 2048 chars. PHCO_25987: ( SR:8606144118 CR:JAGad13451 ) vi(1) dumping core when LANG is set to arabic and when some text is appended to existing line. ( SR:8606187176 CR:JAGad56384 ) If the user resizes the window , while a large data file is still being opened by vi(1),data corruption is noticed. ( SR:8606214324 CR:JAGad83515 ) Some characters for the new Chinese locale conforming to the GB18030 codeset cannot be displayed using the vi editor. ( SR:8606229299 CR:JAGad98352 ) If the user resizes the window, while '/' search is being done in vi(1) session,data corruption is noticed. Defect Description: PHCO_27057: ( SR:8606228872 CR:JAGad97925 ) vi(1) was unable to handle files containing lines of length greater than 2048 characters.This was because, the buffers used in vi(1) were limited to 2048 characters. The problem can reproduced in the following way: $ echo "HELLO" > m $ perl -e 'print "l" x 2047' >> m $ vi m HELLO ~ ~ "m" Line too long Resolution: The size of buffers has been changed from 2048 to 4096 characters. PHCO_25987: ( SR:8606144118 CR:JAGad13451 ) vi(1) dumps core when LANG is set to arabic and when user attempts to append text to the existing line. This was due to negative values were being sent to memcpy library rountine in some cases. Resolution: The code has been changed now to validate the argument values sent to memcpy library function. ( SR:8606187176 CR:JAGad56384 ) If window is resized while vi(1) is loading a huge file,data in the file gets corrupted when the file is saved.This was because of improper handling of SIGWINCH signal in vi(1) while loading a file. The problem can reproduced in the following way: - Create the file "data1" which is more than 2MB size. - Copy the "data1" file into "data2" - vi the "data1" file in an hpterm. - While loading the file, resize the window. - Save and quit from vi. - Now take the diff of two files(data1,data2).There will be difference between the above two files. Resolution: The code has been changed to handle SIGWINCH properly while a data file is being loaded. ( SR:8606214324 CR:JAGad83515 ) Using vi editor some characters for the new Chinese locale conforming to the GB18030 codeset cannot be displayed . It was observed that the values used by macros are same as wide character values. The problem can be reproduced as follows: - Set LANG to zh_CN.gb18030 $ export LANG=zh_CN.gb18030 - Create a file temp1 as follows. $ echo "\0251\0126\0251\0127" > temp1 $ cat temp1 `V`W $ - Run "vi temp1" on a dtterm, you will not be able to see any characters on the screen. Resolution: Now the macros have been assigned new values which fall outside the range of valid wide character values for all the existing locales. ( SR:8606229299 CR:JAGad98352 ) If window is resized while a '/' search command is performed on data file , data in the file gets corrupted when the file is saved. This was because of improper handling of SIGWINCH signal in vi(1) during pattern searching. The problem can be reproduced as follows: - Create a file temp1 with > 1000000 lines.No two lines should be the same. Copy temp1 to temp2. - Search for a particular pattern which is not present in the file or one which is present but towards the end of the file so that the search operation takes time. - Resize the terminal while the search is taking place. Wait until the search operation is over. - Save and quit from vi. - Now take the diff of two files(temp1,temp2).There will be difference between the above two files. temp1 & temp2. Resolution: The code has been modified to handle SIGWINCH properly while a '/' search command is performed in vi(1) session. SR: 8606144118 8606187176 8606214324 8606228872 8606229299 Patch Files: TextEditors.EDIT-ENG-A-MAN,fr=B.11.11, fa=HP-UX_B.11.11_32/64,v=HP: /usr/share/man/man1.Z/edit.1 /usr/share/man/man1.Z/ex.1 /usr/share/man/man1.Z/vedit.1 /usr/share/man/man1.Z/vi.1 /usr/share/man/man1.Z/view.1 TextEditors.EDITORS,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /usr/bin/e /usr/bin/edit /usr/bin/ex /usr/bin/vedit /usr/bin/vi /usr/bin/view /usr/lbin/expreserve /usr/lbin/exrecover what(1) Output: TextEditors.EDIT-ENG-A-MAN,fr=B.11.11, fa=HP-UX_B.11.11_32/64,v=HP: /usr/share/man/man1.Z/edit.1: None /usr/share/man/man1.Z/ex.1: None /usr/share/man/man1.Z/vedit.1: None /usr/share/man/man1.Z/vi.1: None /usr/share/man/man1.Z/view.1: None TextEditors.EDITORS,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /usr/bin/e: ex.c $Date: 2002/05/16 04:22:01 $Revision: r11.11/1 PATCH_11.11 (PHCO_27057) ex_addr.c $Date: 2002/03/13 22:55:37 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_cmds.c $Date: 2002/03/13 22:55:48 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_io.c $Date: 2002/03/13 22:55:59 $Revision: r11.11 /2 PATCH_11.11 (PHCO_25987) ex_put.c $Date: 2002/03/13 22:56:11 $Revision: r11.1 1/2 PATCH_11.11 (PHCO_25987) ex_subr.c $Date: 2002/03/13 22:56:24 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_v.c $Date: 2002/03/13 22:56:36 $Revision: r11.11/ 3 PATCH_11.11 (PHCO_25987) ex_vops2.c $Date: 2002/03/13 22:56:59 $Revision: r11 .11/2 PATCH_11.11 (PHCO_25987) ex_vput.c $Date: 2002/03/13 22:57:11 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_vwind.c $Date: 2002/03/13 22:57:22 $Revision: r11 .11/2 PATCH_11.11 (PHCO_25987) $Revision: @(#) all CUP11.11_BL2002_0521_14 PATCH_11 .11 PHCO_27057 Tue May 21 20:22:11 PDT 2002 $ $ B.11.11_LR Oct 27 2000 00:57:16 $ /usr/bin/edit: ex.c $Date: 2002/05/16 04:22:01 $Revision: r11.11/1 PATCH_11.11 (PHCO_27057) ex_addr.c $Date: 2002/03/13 22:55:37 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_cmds.c $Date: 2002/03/13 22:55:48 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_io.c $Date: 2002/03/13 22:55:59 $Revision: r11.11 /2 PATCH_11.11 (PHCO_25987) ex_put.c $Date: 2002/03/13 22:56:11 $Revision: r11.1 1/2 PATCH_11.11 (PHCO_25987) ex_subr.c $Date: 2002/03/13 22:56:24 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_v.c $Date: 2002/03/13 22:56:36 $Revision: r11.11/ 3 PATCH_11.11 (PHCO_25987) ex_vops2.c $Date: 2002/03/13 22:56:59 $Revision: r11 .11/2 PATCH_11.11 (PHCO_25987) ex_vput.c $Date: 2002/03/13 22:57:11 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_vwind.c $Date: 2002/03/13 22:57:22 $Revision: r11 .11/2 PATCH_11.11 (PHCO_25987) $Revision: @(#) all CUP11.11_BL2002_0521_14 PATCH_11 .11 PHCO_27057 Tue May 21 20:22:11 PDT 2002 $ $ B.11.11_LR Oct 27 2000 00:57:16 $ /usr/bin/ex: ex.c $Date: 2002/05/16 04:22:01 $Revision: r11.11/1 PATCH_11.11 (PHCO_27057) ex_addr.c $Date: 2002/03/13 22:55:37 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_cmds.c $Date: 2002/03/13 22:55:48 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_io.c $Date: 2002/03/13 22:55:59 $Revision: r11.11 /2 PATCH_11.11 (PHCO_25987) ex_put.c $Date: 2002/03/13 22:56:11 $Revision: r11.1 1/2 PATCH_11.11 (PHCO_25987) ex_subr.c $Date: 2002/03/13 22:56:24 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_v.c $Date: 2002/03/13 22:56:36 $Revision: r11.11/ 3 PATCH_11.11 (PHCO_25987) ex_vops2.c $Date: 2002/03/13 22:56:59 $Revision: r11 .11/2 PATCH_11.11 (PHCO_25987) ex_vput.c $Date: 2002/03/13 22:57:11 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_vwind.c $Date: 2002/03/13 22:57:22 $Revision: r11 .11/2 PATCH_11.11 (PHCO_25987) $Revision: @(#) all CUP11.11_BL2002_0521_14 PATCH_11 .11 PHCO_27057 Tue May 21 20:22:11 PDT 2002 $ $ B.11.11_LR Oct 27 2000 00:57:16 $ /usr/bin/vedit: ex.c $Date: 2002/05/16 04:22:01 $Revision: r11.11/1 PATCH_11.11 (PHCO_27057) ex_addr.c $Date: 2002/03/13 22:55:37 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_cmds.c $Date: 2002/03/13 22:55:48 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_io.c $Date: 2002/03/13 22:55:59 $Revision: r11.11 /2 PATCH_11.11 (PHCO_25987) ex_put.c $Date: 2002/03/13 22:56:11 $Revision: r11.1 1/2 PATCH_11.11 (PHCO_25987) ex_subr.c $Date: 2002/03/13 22:56:24 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_v.c $Date: 2002/03/13 22:56:36 $Revision: r11.11/ 3 PATCH_11.11 (PHCO_25987) ex_vops2.c $Date: 2002/03/13 22:56:59 $Revision: r11 .11/2 PATCH_11.11 (PHCO_25987) ex_vput.c $Date: 2002/03/13 22:57:11 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_vwind.c $Date: 2002/03/13 22:57:22 $Revision: r11 .11/2 PATCH_11.11 (PHCO_25987) $Revision: @(#) all CUP11.11_BL2002_0521_14 PATCH_11 .11 PHCO_27057 Tue May 21 20:22:11 PDT 2002 $ $ B.11.11_LR Oct 27 2000 00:57:16 $ /usr/bin/vi: ex.c $Date: 2002/05/16 04:22:01 $Revision: r11.11/1 PATCH_11.11 (PHCO_27057) ex_addr.c $Date: 2002/03/13 22:55:37 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_cmds.c $Date: 2002/03/13 22:55:48 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_io.c $Date: 2002/03/13 22:55:59 $Revision: r11.11 /2 PATCH_11.11 (PHCO_25987) ex_put.c $Date: 2002/03/13 22:56:11 $Revision: r11.1 1/2 PATCH_11.11 (PHCO_25987) ex_subr.c $Date: 2002/03/13 22:56:24 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_v.c $Date: 2002/03/13 22:56:36 $Revision: r11.11/ 3 PATCH_11.11 (PHCO_25987) ex_vops2.c $Date: 2002/03/13 22:56:59 $Revision: r11 .11/2 PATCH_11.11 (PHCO_25987) ex_vput.c $Date: 2002/03/13 22:57:11 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_vwind.c $Date: 2002/03/13 22:57:22 $Revision: r11 .11/2 PATCH_11.11 (PHCO_25987) $Revision: @(#) all CUP11.11_BL2002_0521_14 PATCH_11 .11 PHCO_27057 Tue May 21 20:22:11 PDT 2002 $ $ B.11.11_LR Oct 27 2000 00:57:16 $ /usr/bin/view: ex.c $Date: 2002/05/16 04:22:01 $Revision: r11.11/1 PATCH_11.11 (PHCO_27057) ex_addr.c $Date: 2002/03/13 22:55:37 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_cmds.c $Date: 2002/03/13 22:55:48 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_io.c $Date: 2002/03/13 22:55:59 $Revision: r11.11 /2 PATCH_11.11 (PHCO_25987) ex_put.c $Date: 2002/03/13 22:56:11 $Revision: r11.1 1/2 PATCH_11.11 (PHCO_25987) ex_subr.c $Date: 2002/03/13 22:56:24 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_v.c $Date: 2002/03/13 22:56:36 $Revision: r11.11/ 3 PATCH_11.11 (PHCO_25987) ex_vops2.c $Date: 2002/03/13 22:56:59 $Revision: r11 .11/2 PATCH_11.11 (PHCO_25987) ex_vput.c $Date: 2002/03/13 22:57:11 $Revision: r11. 11/2 PATCH_11.11 (PHCO_25987) ex_vwind.c $Date: 2002/03/13 22:57:22 $Revision: r11 .11/2 PATCH_11.11 (PHCO_25987) $Revision: @(#) all CUP11.11_BL2002_0521_14 PATCH_11 .11 PHCO_27057 Tue May 21 20:22:11 PDT 2002 $ $ B.11.11_LR Oct 27 2000 00:57:16 $ /usr/lbin/expreserve: expreserve.c $Date: 2002/05/16 04:22:01 $Revision: r 11.11/1 PATCH_11.11 (PHCO_27057) $Revision: @(#) all CUP11.11_BL2002_0521_14 PATCH_11 .11 PHCO_27057 Tue May 21 20:22:28 PDT 2002 $ $ B.11.11_LR Oct 27 2000 00:57:16 $ /usr/lbin/exrecover: exrecover.c $Date: 2002/05/16 04:22:01 $Revision: r1 1.11/1 PATCH_11.11 (PHCO_27057) $Revision: @(#) all CUP11.11_BL2002_0521_14 PATCH_11 .11 PHCO_27057 Tue May 21 20:22:20 PDT 2002 $ $ B.11.11_LR Oct 27 2000 00:57:16 $ cksum(1) Output: TextEditors.EDIT-ENG-A-MAN,fr=B.11.11, fa=HP-UX_B.11.11_32/64,v=HP: 2350953384 29585 /usr/share/man/man1.Z/edit.1 2350953384 29585 /usr/share/man/man1.Z/ex.1 2573191330 16483 /usr/share/man/man1.Z/vedit.1 2573191330 16483 /usr/share/man/man1.Z/vi.1 2573191330 16483 /usr/share/man/man1.Z/view.1 TextEditors.EDITORS,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: 1499344231 249856 /usr/bin/e 1499344231 249856 /usr/bin/edit 1499344231 249856 /usr/bin/ex 1499344231 249856 /usr/bin/vedit 1499344231 249856 /usr/bin/vi 1499344231 249856 /usr/bin/view 4085014025 16384 /usr/lbin/expreserve 1954832974 20480 /usr/lbin/exrecover Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHCO_25987 Equivalent Patches: None Patch Package Size: 370 KBytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or your Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitation of liability and warranties, before installing this patch. ------------------------------------------------------------ 1. Back up your system before installing a patch. 2. Login as root. 3. Copy the patch to the /tmp directory. 4. Move to the /tmp directory and unshar the patch: cd /tmp sh PHCO_27057 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHCO_27057.depot By default swinstall will archive the original software in /var/adm/sw/save/PHCO_27057. If you do not wish to retain a copy of the original software, include the patch_save_files option in the swinstall command above: -x patch_save_files=false WARNING: If patch_save_files is false when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. For future reference, the contents of the PHCO_27057.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHCO_27057.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHCO_27057.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None