View Issue Details

IDProjectCategoryView StatusLast Update
0000489Far ManagerPlugins API.Old API Wrapperpublic2008-03-13 09:13
Reporteralexmitin Assigned Toalexy  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Fixed in Version1.80 alpha 1 
Summary0000489: Crash in ConvertPanelItemA()
DescriptionSteps to reproduce:

1) Start FAR under debugger.
Make sure you have "Network Browser" plugin.

2) Type the following command:

   net:

After this command completes the FAR shows the following list:

  * Favorites
  * Microsoft Terminal Services
  * Microsoft Windows Network
  * Web Client Network

3) Type the following command:

  cd \\computer\myshare

Make sure that either "computer" or "myshare" do not exists prior this command.

4) When you see an network error dialog with the message "The network path was not found" press OK.

The result: Crash in the following place.

File: wrap.cpp
Context:
void ConvertPanelItemA(const oldfar::PluginPanelItem *PanelItemA, PluginPanelItem **PanelItemW, int ItemsNumber)
{
  *PanelItemW = (PluginPanelItem *)xf_malloc(ItemsNumber*sizeof(PluginPanelItem));

  memset(*PanelItemW,0,ItemsNumber*sizeof(PluginPanelItem));

  for (int i=0; i<ItemsNumber; i++)
  {
    (*PanelItemW)[i].Flags = PanelItemA[i].Flags; <==[crash]==
    (*PanelItemW)[i].NumberOfLinks = PanelItemA[i].NumberOfLinks;
...
}

Analysis
========================
The reason of the crash is the uninitialized variable "PluginFileCount" in the function FileList::UpdatePlugin() (file: flupdate.cpp)

After the sequence of the events 1-4 the value of this variable is used first in the PluginA::GetFindData() function and then in the the ConvertPanelItemA() function.

Depending on your luck the crash can happen immediately or after some attempts.


The fix:
========================
void FileList::UpdatePlugin(int KeepSelection, int IgnoreVisible)
{
...
  int PluginFileCount = 0;
...
}
Additional InformationFAR 1.80.0.433
Network Browser plugin NETWORK.DLL 1.71.0.37
TagsNo tags attached.
Build435

Activities

alexy

2008-03-12 03:36

administrator   bugnote:0001286

Тока надо в
PluginManager::GetFindData
обнулять для 100%-сти

alexy

2008-03-12 03:36

administrator   bugnote:0001287

fixed. 435.

Issue History

Date Modified Username Field Change
2008-03-12 01:10 alexmitin New Issue
2008-03-12 01:10 alexmitin Status new => assigned
2008-03-12 01:10 alexmitin Assigned To => alexy
2008-03-12 03:36 alexy Note Added: 0001286
2008-03-12 03:36 alexy Status assigned => feedback
2008-03-12 03:36 alexy Note Added: 0001287
2008-03-13 09:13 alexy Build => 435
2008-03-13 09:13 alexy Status feedback => closed
2008-03-13 09:13 alexy Resolution open => fixed
2008-03-13 09:13 alexy Fixed in Version => 1.80 alpha 1