<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Bug in ftpsrv_help in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Bug-in-ftpsrv-help/m-p/372370#M12290</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;In MQX 4.1.1. there is a bug in function ftpsrv_help (ftpsrv_cmd.c).&lt;/P&gt;&lt;P&gt;If one adds custom FTP commands so that the overall number of FTP commands is no longer a multiple of 4, then the remotehelp command will no longer work correctly.&lt;/P&gt;&lt;P&gt;I identified line 255 in ftpsrv_help being the problem where a closing "\r\n" is appended to the buffer.&lt;/P&gt;&lt;P&gt;However the counter 'space' is not decremented by two and the closing "\r\n" is not send.&lt;/P&gt;&lt;P&gt;The effect of this is that you are not able to enter any command in a ftp client when you call 'remotehelp'.&lt;/P&gt;&lt;P&gt;I fixed this like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;if (n)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;{&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;space -= snprintf(buffer+length, space, "\r\n");&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;}&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;/* Send command list from the buffer and set message to HELP end text */&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;send(session-&amp;gt;control_sock, buffer, FTPSRV_BUF_SIZE-space, 0);&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Oct 2014 08:55:28 GMT</pubDate>
    <dc:creator>CorderBollie</dc:creator>
    <dc:date>2014-10-07T08:55:28Z</dc:date>
    <item>
      <title>Bug in ftpsrv_help</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Bug-in-ftpsrv-help/m-p/372370#M12290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;In MQX 4.1.1. there is a bug in function ftpsrv_help (ftpsrv_cmd.c).&lt;/P&gt;&lt;P&gt;If one adds custom FTP commands so that the overall number of FTP commands is no longer a multiple of 4, then the remotehelp command will no longer work correctly.&lt;/P&gt;&lt;P&gt;I identified line 255 in ftpsrv_help being the problem where a closing "\r\n" is appended to the buffer.&lt;/P&gt;&lt;P&gt;However the counter 'space' is not decremented by two and the closing "\r\n" is not send.&lt;/P&gt;&lt;P&gt;The effect of this is that you are not able to enter any command in a ftp client when you call 'remotehelp'.&lt;/P&gt;&lt;P&gt;I fixed this like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;if (n)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;{&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;space -= snprintf(buffer+length, space, "\r\n");&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;}&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;/* Send command list from the buffer and set message to HELP end text */&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;send(session-&amp;gt;control_sock, buffer, FTPSRV_BUF_SIZE-space, 0);&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2014 08:55:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Bug-in-ftpsrv-help/m-p/372370#M12290</guid>
      <dc:creator>CorderBollie</dc:creator>
      <dc:date>2014-10-07T08:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in ftpsrv_help</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Bug-in-ftpsrv-help/m-p/372371#M12291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your effort. We already fixed this bug for next release of MQX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Kare&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2014 10:14:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Bug-in-ftpsrv-help/m-p/372371#M12291</guid>
      <dc:creator>karelm_</dc:creator>
      <dc:date>2014-10-07T10:14:40Z</dc:date>
    </item>
  </channel>
</rss>

