AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Lokale string Variable als Zwischenspeicher benötigt
Thema durchsuchen
Ansicht
Themen-Optionen

Lokale string Variable als Zwischenspeicher benötigt

Ein Thema von TurboMagic · begonnen am 25. Aug 2021 · letzter Beitrag vom 27. Aug 2021
Antwort Antwort
Benutzerbild von himitsu
himitsu
Online

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.342 Beiträge
 
Delphi 12 Athens
 
#1

AW: Lokale string Variable als Zwischenspeicher benötigt

  Alt 26. Aug 2021, 10:41
Außerdem ist cnMaxUserNameLen total falsch.
* erstmal 254 statt 256
* und wird -1 statt +1 für die #0

Delphi-Strings haben zwar #0#0 eingebaut, aber dennoch könnte es somit einen Speicherüberlauf von 2 Chars / 4 Bytes geben.

Zitat:
Code:
/*
    This file contains constants used throughout the LAN Manager
    API header files. It should be included in any source file
    that is going to include other LAN Manager API header files or
    call a LAN Manager API.

    NOTE: Lengths of strings are given as the maximum lengths of the
    string in characters (not bytes). This does not include space for the
    terminating 0-characters. When allocating space for such an item,
    use the form:

        TCHAR username[UNLEN+1];
*/

#define UNLEN      256                 // Maximum user name length
Ein Therapeut entspricht 1024 Gigapeut.
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:12 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz