News:

  • October 27, 2026, 06:43:22 AM

Login with username, password and session length

Author Topic: Do-more warning message  (Read 11820 times)

fluidpowerman

  • Full Member
  • ***
  • Posts: 21
Do-more warning message
« on: December 18, 2013, 10:29:58 AM »
Not sure I structured this correctly,  I am getting a warning message.  Any suggestions is greatly appreciated!

Warning Messages - help
Buffer overflow - $BufferOverflow (ST140)
Attempted string operation was longer than target string and was truncated in STRGETB at main

STRGETB
Get out of String    SS0
start at index        0
Length of Bytes       32
Ingo Starting Element DLV1400-DLV1417

attached is the example of my code


BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6178
  • Yes Pinky, Do-more will control the world!
Re: Do-more warning message
« Reply #1 on: December 18, 2013, 01:21:25 PM »
It's just telling you that you read past the available data...you read 32 bytes, but the string wasn't 32 bytes long, so it only read up to the end of the string and not the full 32 bytes you asked for.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

fluidpowerman

  • Full Member
  • ***
  • Posts: 21
Re: Do-more warning message
« Reply #2 on: December 20, 2013, 12:42:44 PM »
That makes sense,  so if I wanted to enter as a customer "Bryan Manning"  then I would have to know the string length and make that the number of bytes to get out of string.  but when the number of bytes will vary depending on the customer name then it get tricky.

plcnut

  • Hero Member
  • *****
  • Posts: 815
    • premiersi.com
Re: Do-more warning message
« Reply #3 on: December 20, 2013, 12:55:42 PM »
You can use a MOVE YourString1.length to D0,
and then use D0 for the 'Length in bytes' in your STRGETB instruction.
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
https://premiersi.com

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3853
    • Host Engineering
Re: Do-more warning message
« Reply #4 on: December 20, 2013, 01:27:39 PM »
You can use a MOVE YourString1.length to D0,
and then use D0 for the 'Length in bytes' in your STRGETB instruction.
Or simply use YourString1.Length as the length parameter  ;D

plcnut

  • Hero Member
  • *****
  • Posts: 815
    • premiersi.com
Re: Do-more warning message
« Reply #5 on: December 20, 2013, 01:31:57 PM »
You can use a MOVE YourString1.length to D0,
and then use D0 for the 'Length in bytes' in your STRGETB instruction.
Or simply use YourString1.Length as the length parameter  ;D
Ummm... Sounds to simple ;D
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
https://premiersi.com